aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/ssl_logger.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ssl/src/ssl_logger.erl')
-rw-r--r--lib/ssl/src/ssl_logger.erl16
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/ssl/src/ssl_logger.erl b/lib/ssl/src/ssl_logger.erl
index ce8225bf72..51db8e6bdf 100644
--- a/lib/ssl/src/ssl_logger.erl
+++ b/lib/ssl/src/ssl_logger.erl
@@ -20,7 +20,7 @@
-module(ssl_logger).
--export([debug/3,
+-export([debug/4,
format/2,
notice/2]).
@@ -57,12 +57,20 @@ format(#{level:= _Level, msg:= {report, Msg}, meta:= _Meta}, _Config0) ->
end.
%% Stateful logging
-debug(Level, Report, Meta) ->
+debug(Level, Direction, Protocol, Message)
+ when (Direction =:= inbound orelse Direction =:= outbound) andalso
+ (Protocol =:= 'tls_record' orelse Protocol =:= 'handshake') ->
case logger:compare_levels(Level, debug) of
lt ->
- ?LOG_DEBUG(Report, Meta);
+ ?LOG_DEBUG(#{direction => Direction,
+ protocol => Protocol,
+ message => Message},
+ #{domain => [otp,ssl,Protocol]});
eq ->
- ?LOG_DEBUG(Report, Meta);
+ ?LOG_DEBUG(#{direction => Direction,
+ protocol => Protocol,
+ message => Message},
+ #{domain => [otp,ssl,Protocol]});
_ ->
ok
end.