aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/logger.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2018-06-07 16:23:19 +0200
committerSiri Hansen <[email protected]>2018-06-11 15:01:41 +0200
commitc026109009942d7a877242f161860cc824223cf1 (patch)
tree44cae2092634830ecaab5732aacd7c142c8ebc6e /lib/kernel/src/logger.erl
parentb91eceaf71e0009346d119346a33894ed53be7b0 (diff)
downloadotp-c026109009942d7a877242f161860cc824223cf1.tar.gz
otp-c026109009942d7a877242f161860cc824223cf1.tar.bz2
otp-c026109009942d7a877242f161860cc824223cf1.zip
[logger] Change default primary log level to 'notice'
Log events issued via error_logger:info_msg or error_logger:info_report are now forwarded to Logger with level 'notice' instead of 'info'. Log events issued by gen_* behaviours are also changed from level 'info' to level 'notice'. Progress reports are still 'info', and can therefore easily be included/excluded by changing the primary log level. By default, they are not logged.
Diffstat (limited to 'lib/kernel/src/logger.erl')
-rw-r--r--lib/kernel/src/logger.erl17
1 files changed, 3 insertions, 14 deletions
diff --git a/lib/kernel/src/logger.erl b/lib/kernel/src/logger.erl
index f6dc8ea397..e0832bf31c 100644
--- a/lib/kernel/src/logger.erl
+++ b/lib/kernel/src/logger.erl
@@ -710,15 +710,7 @@ get_default_handler_filters() ->
true ->
?DEFAULT_HANDLER_FILTERS([otp]);
false ->
- Extra =
- case application:get_env(kernel, logger_progress_reports, stop) of
- log ->
- [];
- stop ->
- [{stop_progress,
- {fun logger_filters:progress/2,stop}}]
- end,
- Extra ++ ?DEFAULT_HANDLER_FILTERS([otp,sasl])
+ ?DEFAULT_HANDLER_FILTERS([otp,sasl])
end.
get_logger_env() ->
@@ -726,17 +718,14 @@ get_logger_env() ->
%%%-----------------------------------------------------------------
%%% Internal
-do_log(Level,Msg,Meta) ->
- do_log_1(Level,Msg,Meta).
-
-do_log_1(Level,Msg,#{mfa:={Module,_,_}}=Meta) ->
+do_log(Level,Msg,#{mfa:={Module,_,_}}=Meta) ->
case logger_config:allow(?LOGGER_TABLE,Level,Module) of
true ->
log_allowed(#{},Level,Msg,Meta);
false ->
ok
end;
-do_log_1(Level,Msg,Meta) ->
+do_log(Level,Msg,Meta) ->
case logger_config:allow(?LOGGER_TABLE,Level) of
true ->
log_allowed(#{},Level,Msg,Meta);