aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/tls_sender.erl
diff options
context:
space:
mode:
authorPéter Dimitrov <[email protected]>2019-01-29 14:13:52 +0100
committerPéter Dimitrov <[email protected]>2019-01-29 16:25:18 +0100
commitf126ae85c8eedc3975b6ef02ddd85d0c891e1696 (patch)
treeb975bc27286c33cc95609dceb803c5eb7aaa57c0 /lib/ssl/src/tls_sender.erl
parent1ea703443fa0bbc3aade0bb61fc96b2f0cf6b84c (diff)
downloadotp-f126ae85c8eedc3975b6ef02ddd85d0c891e1696.tar.gz
otp-f126ae85c8eedc3975b6ef02ddd85d0c891e1696.tar.bz2
otp-f126ae85c8eedc3975b6ef02ddd85d0c891e1696.zip
ssl: Improve ssl_logger
Improve API and delay creation of map arguments for ?LOG_DEBUG macro. Change-Id: I6956112fe64e599d33d83dfdd710cad53b8449e1
Diffstat (limited to 'lib/ssl/src/tls_sender.erl')
-rw-r--r--lib/ssl/src/tls_sender.erl15
1 files changed, 3 insertions, 12 deletions
diff --git a/lib/ssl/src/tls_sender.erl b/lib/ssl/src/tls_sender.erl
index 1559fcbb37..1f34f9a420 100644
--- a/lib/ssl/src/tls_sender.erl
+++ b/lib/ssl/src/tls_sender.erl
@@ -386,10 +386,7 @@ send_tls_alert(Alert, #data{negotiated_version = Version,
{BinMsg, ConnectionStates} =
Connection:encode_alert(Alert, Version, ConnectionStates0),
Connection:send(Transport, Socket, BinMsg),
- Report = #{direction => outbound,
- protocol => 'tls_record',
- message => BinMsg},
- ssl_logger:debug(LogLevel, Report, #{domain => [otp,ssl,tls_record]}),
+ ssl_logger:debug(LogLevel, outbound, 'tls_record', BinMsg),
StateData0#data{connection_states = ConnectionStates}.
send_application_data(Data, From, StateName,
@@ -414,18 +411,12 @@ send_application_data(Data, From, StateName,
StateData = StateData0#data{connection_states = ConnectionStates},
case Connection:send(Transport, Socket, Msgs) of
ok when DistHandle =/= undefined ->
- Report = #{direction => outbound,
- protocol => 'tls_record',
- message => Msgs},
- ssl_logger:debug(LogLevel, Report, #{domain => [otp,ssl,tls_record]}),
+ ssl_logger:debug(LogLevel, outbound, 'tls_record', Msgs),
{next_state, StateName, StateData, []};
Reason when DistHandle =/= undefined ->
{next_state, death_row, StateData, [{state_timeout, 5000, Reason}]};
ok ->
- Report = #{direction => outbound,
- protocol => 'tls_record',
- message => Msgs},
- ssl_logger:debug(LogLevel, Report, #{domain => [otp,ssl,tls_record]}),
+ ssl_logger:debug(LogLevel, outbound, 'tls_record', Msgs),
{next_state, StateName, StateData, [{reply, From, ok}]};
Result ->
{next_state, StateName, StateData, [{reply, From, Result}]}