aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/logger_config.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2018-06-04 19:53:02 +0200
committerSiri Hansen <[email protected]>2018-06-08 14:41:34 +0200
commit983a945b84e15f58c3205c37b7bfcad18537325c (patch)
treea1fdce539da80b497bffe3a2c5cba868cb6755d8 /lib/kernel/src/logger_config.erl
parente5bbcfd47088162a1c349eeb5aa3c37d8263d274 (diff)
downloadotp-983a945b84e15f58c3205c37b7bfcad18537325c.tar.gz
otp-983a945b84e15f58c3205c37b7bfcad18537325c.tar.bz2
otp-983a945b84e15f58c3205c37b7bfcad18537325c.zip
[logger] Add configurable log levels 'all' and 'none'
New default for handlers is 'all'.
Diffstat (limited to 'lib/kernel/src/logger_config.erl')
-rw-r--r--lib/kernel/src/logger_config.erl8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/kernel/src/logger_config.erl b/lib/kernel/src/logger_config.erl
index 8d05648109..113c8140cf 100644
--- a/lib/kernel/src/logger_config.erl
+++ b/lib/kernel/src/logger_config.erl
@@ -136,6 +136,7 @@ get(Tid) ->
Modules = get_module_level(Tid),
{Logger,Handlers,Modules}.
+level_to_int(none) -> ?LOG_NONE;
level_to_int(emergency) -> ?EMERGENCY;
level_to_int(alert) -> ?ALERT;
level_to_int(critical) -> ?CRITICAL;
@@ -143,8 +144,10 @@ level_to_int(error) -> ?ERROR;
level_to_int(warning) -> ?WARNING;
level_to_int(notice) -> ?NOTICE;
level_to_int(info) -> ?INFO;
-level_to_int(debug) -> ?DEBUG.
+level_to_int(debug) -> ?DEBUG;
+level_to_int(all) -> ?LOG_ALL.
+int_to_level(?LOG_NONE) -> none;
int_to_level(?EMERGENCY) -> emergency;
int_to_level(?ALERT) -> alert;
int_to_level(?CRITICAL) -> critical;
@@ -152,7 +155,8 @@ int_to_level(?ERROR) -> error;
int_to_level(?WARNING) -> warning;
int_to_level(?NOTICE) -> notice;
int_to_level(?INFO) -> info;
-int_to_level(?DEBUG) -> debug.
+int_to_level(?DEBUG) -> debug;
+int_to_level(?LOG_ALL) -> all.
%%%-----------------------------------------------------------------
%%% Internal