From 395dbad6bcc38c3384840674f40657273b05b14a Mon Sep 17 00:00:00 2001
From: Lukas Larsson
Date: Tue, 8 May 2018 16:13:50 +0200
Subject: logger: Rework configuration of logger
Most logger configuration that was possible through
kernel application variables have been moved into a
common 'logger' application environment in kernel.
Now all the configuration possible through the logger
API can be done as sys config.
The handler started by kernel has been renamed to 'default'
instead of logger_std_h.
There is a new logger:setup_handlers/1 function that given an
application name can be used to setup handlers in other applications.
---
lib/sasl/test/sasl_report_SUITE.erl | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
(limited to 'lib/sasl')
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),
--
cgit v1.2.3
From 92d93f85e88235f3fa757d300628d382d09c6226 Mon Sep 17 00:00:00 2001
From: Siri Hansen
Date: Wed, 9 May 2018 14:28:44 +0200
Subject: Fix some link errors in logger documentation
---
lib/sasl/doc/src/sasl_app.xml | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
(limited to 'lib/sasl')
diff --git a/lib/sasl/doc/src/sasl_app.xml b/lib/sasl/doc/src/sasl_app.xml
index 48b0b8eafb..8f92a22cf7 100644
--- a/lib/sasl/doc/src/sasl_app.xml
+++ b/lib/sasl/doc/src/sasl_app.xml
@@ -119,22 +119,18 @@
Formats and writes supervisor reports, crash
reports, and progress reports to stdio.
This error logger event handler uses
- logger_format_depth
+ error_logger_format_depth
in the Kernel application to limit how much detail is printed
- in crash and supervisor reports. If logger_format_depth
- is not set, it uses the old error_logger_format_depth
- instead.
+ in crash and supervisor reports.
sasl_report_file_h
-
Formats and writes supervisor reports, crash
report, and progress report to a single file.
This error logger event handler uses
- logger_format_depth
+ error_logger_format_depth
in the Kernel application to limit the details printed in
- crash and supervisor reports. If logger_format_depth is
- not set, it uses the old error_logger_format_depth
- instead.
+ crash and supervisor reports.
A similar behaviour, but still using the new logger API, can be
--
cgit v1.2.3
From ee9e7de41ec6b14857a2e32099cf76b425c3b778 Mon Sep 17 00:00:00 2001
From: Siri Hansen
Date: Mon, 14 May 2018 17:00:34 +0200
Subject: Add filter to sasl_h which stops log events with remote gl
---
lib/sasl/src/sasl.erl | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
(limited to 'lib/sasl')
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},
--
cgit v1.2.3
From 0afab64f105c09976c7c07a64f54bf962ff9a18f Mon Sep 17 00:00:00 2001
From: Siri Hansen
Date: Wed, 16 May 2018 14:12:23 +0200
Subject: Format logger timestamps according to RFC3339
---
lib/sasl/doc/src/sasl_app.xml | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
(limited to 'lib/sasl')
diff --git a/lib/sasl/doc/src/sasl_app.xml b/lib/sasl/doc/src/sasl_app.xml
index 8f92a22cf7..26b9bece2a 100644
--- a/lib/sasl/doc/src/sasl_app.xml
+++ b/lib/sasl/doc/src/sasl_app.xml
@@ -86,12 +86,6 @@
RELDIR is used. By default, this is
$OTP_ROOT/releases.
-
- -
-
If set to true, all dates in textual log outputs are
- displayed in Universal Coordinated Time with the string
- UTC appended.
-
@@ -175,6 +169,12 @@
sasl_error_logger to error reports or progress reports,
or both. Default is all.
+
+ -
+
If set to true, all dates in textual log outputs are
+ displayed in Universal Coordinated Time with the string
+ UTC appended.
+
The error logger event handler log_mf_h can also still
--
cgit v1.2.3