aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/tls_handshake.erl
diff options
context:
space:
mode:
authorPéter Dimitrov <[email protected]>2018-06-18 17:17:22 +0200
committerPéter Dimitrov <[email protected]>2018-07-02 12:38:36 +0200
commit13ae4276e81853a1d66aeaeaa392230037cf3a04 (patch)
tree5f624ae92eb44475a006a917a4eb1dc991dde965 /lib/ssl/src/tls_handshake.erl
parent41a71f54b2da01bc532d0c2d16c691e6622817ca (diff)
downloadotp-13ae4276e81853a1d66aeaeaa392230037cf3a04.tar.gz
otp-13ae4276e81853a1d66aeaeaa392230037cf3a04.tar.bz2
otp-13ae4276e81853a1d66aeaeaa392230037cf3a04.zip
ssl: Add support for stateful logging
- Introduce stateful logging levels to the ssl application: The SSL option 'log_alert' sets log level to notice/warning if it is set to true/false. Default log level is notice. - Add new SSL option 'log_level' that overrides the value of 'log_alert'. Default value is notice. - 'log_level' debug triggers verbose logging of TLS protocol messages and logging of ignored alerts in DTLS. Change-Id: I28d3f4029a5d504ec612abe4b9ae0b7d9b115197
Diffstat (limited to 'lib/ssl/src/tls_handshake.erl')
-rw-r--r--lib/ssl/src/tls_handshake.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ssl/src/tls_handshake.erl b/lib/ssl/src/tls_handshake.erl
index 4aed414b6d..4e6bbb5061 100644
--- a/lib/ssl/src/tls_handshake.erl
+++ b/lib/ssl/src/tls_handshake.erl
@@ -276,7 +276,7 @@ get_tls_handshake_aux(Version, <<?BYTE(Type), ?UINT24(Length),
Report = #{direction => inbound,
protocol => 'handshake',
message => Handshake},
- ?LOG_DEBUG(Report, #{domain => [otp,ssl,handshake]}),
+ ssl_logger:debug(Opts#ssl_options.log_level, Report, #{domain => [otp,ssl,handshake]}),
get_tls_handshake_aux(Version, Rest, Opts, [{Handshake,Raw} | Acc])
catch
_:_ ->