aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sasl/src
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sasl/src')
-rw-r--r--lib/sasl/src/sasl.erl16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/sasl/src/sasl.erl b/lib/sasl/src/sasl.erl
index 92b80694d7..5db3d75cfb 100644
--- a/lib/sasl/src/sasl.erl
+++ b/lib/sasl/src/sasl.erl
@@ -131,6 +131,10 @@ add_sasl_logger(std, undefined) -> ok;
add_sasl_logger(Dest, Level) ->
FC = #{legacy_header=>true,
single_line=>false},
+ case Level of
+ info -> allow_progress();
+ _ -> ok
+ end,
ok = logger:add_handler(sasl,logger_std_h,
#{level=>Level,
filter_default=>stop,
@@ -139,8 +143,8 @@ add_sasl_logger(Dest, Level) ->
{fun logger_filters:remote_gl/2,stop}},
{sasl_domain,
{fun logger_filters:domain/2,
- {log,equal,[beam,erlang,otp,sasl]}}}],
- logger_std_h=>#{type=>Dest},
+ {log,equal,[otp,sasl]}}}],
+ config=>#{type=>Dest},
formatter=>{logger_formatter,FC}}).
delete_sasl_logger(undefined) -> ok;
@@ -151,6 +155,7 @@ delete_sasl_logger(_Type) ->
add_error_logger_mf(undefined) -> ok;
add_error_logger_mf({Dir, MaxB, MaxF}) ->
+ allow_progress(),
error_logger:add_report_handler(
log_mf_h, log_mf_h:init(Dir, MaxB, MaxF, fun pred/1)).
@@ -161,6 +166,13 @@ delete_error_logger_mf(_) ->
pred({_Type, GL, _Msg}) when node(GL) =/= node() -> false;
pred(_) -> true.
+allow_progress() ->
+ #{level:=PL} = logger:get_primary_config(),
+ case logger:compare_levels(info,PL) of
+ lt -> ok = logger:set_primary_config(level,info);
+ _ -> ok
+ end.
+
%%%-----------------------------------------------------------------
%%% supervisor functionality
%%%-----------------------------------------------------------------