aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sasl
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2018-05-23 09:55:05 +0200
committerLukas Larsson <[email protected]>2018-05-23 09:55:05 +0200
commit39328ee50d04bd7abfe835f295d92edd17701d64 (patch)
tree23362eca4f1e24940706e37cf8eb5cadeba550cc /lib/sasl
parente30436394466007826456fa8dfc802c16bcfbdbb (diff)
parent4e9f0492fd46d1ba6d919883cbdd5caaff8a949b (diff)
downloadotp-39328ee50d04bd7abfe835f295d92edd17701d64.tar.gz
otp-39328ee50d04bd7abfe835f295d92edd17701d64.tar.bz2
otp-39328ee50d04bd7abfe835f295d92edd17701d64.zip
Merge branch 'lukas/kernel/logger-config/OTP-13295'
* lukas/kernel/logger-config/OTP-13295: Add Action=differs to logger_filters:domain/2 Format logger timestamps according to RFC3339 Add update_logger_config/1 and update_handler_config/2 to logger Hide handlers field in logger config map from the API Improve santiy check of formatter config Fix error_logger:tty/1 to turn on/off tty logging Add filter to sasl_h which stops log events with remote gl Remove logger env vars for format_depth, max_size and utc Fix some link errors in logger documentation kernel: Make all handler callbacks not block logger logger: Rework configuration of logger
Diffstat (limited to 'lib/sasl')
-rw-r--r--lib/sasl/doc/src/sasl_app.xml24
-rw-r--r--lib/sasl/src/sasl.erl4
-rw-r--r--lib/sasl/test/sasl_report_SUITE.erl6
3 files changed, 17 insertions, 17 deletions
diff --git a/lib/sasl/doc/src/sasl_app.xml b/lib/sasl/doc/src/sasl_app.xml
index 48b0b8eafb..26b9bece2a 100644
--- a/lib/sasl/doc/src/sasl_app.xml
+++ b/lib/sasl/doc/src/sasl_app.xml
@@ -86,12 +86,6 @@
<c>RELDIR</c> is used. By default, this is
<c>$OTP_ROOT/releases</c>.</p>
</item>
- <tag><c><![CDATA[utc_log = true | false ]]></c></tag>
- <item>
- <p>If set to <c>true</c>, all dates in textual log outputs are
- displayed in Universal Coordinated Time with the string
- <c>UTC</c> appended.</p>
- </item>
</taglist>
</section>
@@ -119,22 +113,18 @@
<p>Formats and writes <em>supervisor reports</em>, <em>crash
reports</em>, and <em>progress reports</em> to <c>stdio</c>.
This error logger event handler uses
- <seealso marker="kernel:kernel_app#logger_format_depth"><c>logger_format_depth</c></seealso>
+ <seealso marker="kernel:kernel_app#deprecated-configuration-parameters"><c>error_logger_format_depth</c></seealso>
in the Kernel application to limit how much detail is printed
- in crash and supervisor reports. If <c>logger_format_depth</c>
- is not set, it uses the old <c>error_logger_format_depth</c>
- instead.</p>
+ in crash and supervisor reports.</p>
</item>
<tag><c>sasl_report_file_h</c></tag>
<item>
<p>Formats and writes <em>supervisor reports</em>, <em>crash
report</em>, and <em>progress report</em> to a single file.
This error logger event handler uses
- <seealso marker="kernel:kernel_app#logger_format_depth"><c>logger_format_depth</c></seealso>
+ <seealso marker="kernel:kernel_app#deprecated-configuration-parameters"><c>error_logger_format_depth</c></seealso>
in the Kernel application to limit the details printed in
- crash and supervisor reports. If <c>logger_format_depth</c> is
- not set, it uses the old <c>error_logger_format_depth</c>
- instead.</p>
+ crash and supervisor reports.</p>
</item>
</taglist>
<p>A similar behaviour, but still using the new logger API, can be
@@ -179,6 +169,12 @@
<c>sasl_error_logger</c> to error reports or progress reports,
or both. Default is <c>all</c>.</p>
</item>
+ <tag><marker id="utc_log"/><c><![CDATA[utc_log = true | false ]]></c></tag>
+ <item>
+ <p>If set to <c>true</c>, all dates in textual log outputs are
+ displayed in Universal Coordinated Time with the string
+ <c>UTC</c> appended.</p>
+ </item>
</taglist>
<p>The error logger event handler <c>log_mf_h</c> can also still
diff --git a/lib/sasl/src/sasl.erl b/lib/sasl/src/sasl.erl
index 2bf11bdcdf..9359bdb30e 100644
--- a/lib/sasl/src/sasl.erl
+++ b/lib/sasl/src/sasl.erl
@@ -142,7 +142,9 @@ add_sasl_logger(Dest, Level) ->
#{level=>Level,
filter_default=>stop,
filters=>
- [{sasl_domain,
+ [{remote_gl,
+ {fun logger_filters:remote_gl/2,stop}},
+ {sasl_domain,
{fun logger_filters:domain/2,
{log,equals,[beam,erlang,otp,sasl]}}}],
logger_std_h=>#{type=>Dest},
diff --git a/lib/sasl/test/sasl_report_SUITE.erl b/lib/sasl/test/sasl_report_SUITE.erl
index 96975aaf69..72ee2f0a10 100644
--- a/lib/sasl/test/sasl_report_SUITE.erl
+++ b/lib/sasl/test/sasl_report_SUITE.erl
@@ -54,7 +54,7 @@ gen_server_crash_unicode(Config) ->
gen_server_crash(Config, Encoding) ->
StopFilter = {fun(_,_) -> stop end, ok},
- logger:add_handler_filter(logger_std_h,stop_all,StopFilter),
+ logger:add_handler_filter(default,stop_all,StopFilter),
logger:add_handler_filter(cth_log_redirect,stop_all,StopFilter),
try
do_gen_server_crash(Config, Encoding)
@@ -62,7 +62,7 @@ gen_server_crash(Config, Encoding) ->
ok = application:unset_env(kernel, logger_sasl_compatible),
ok = application:unset_env(sasl, sasl_error_logger),
ok = application:unset_env(kernel, error_logger_format_depth),
- logger:remove_handler_filter(logger_std_h,stop_all),
+ logger:remove_handler_filter(default,stop_all),
logger:remove_handler_filter(cth_log_redirect,stop_all)
end,
ok.
@@ -83,9 +83,11 @@ do_gen_server_crash(Config, Encoding) ->
error_logger:logfile({open,KernelLog}),
application:start(sasl),
logger:i(print),
+ ct:log("error_logger handlers: ~p",[error_logger:which_report_handlers()]),
crash_me(),
+
error_logger:logfile(close),
application:stop(sasl),