diff options
author | Siri Hansen <[email protected]> | 2018-06-04 19:53:02 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2018-06-08 14:41:34 +0200 |
commit | 983a945b84e15f58c3205c37b7bfcad18537325c (patch) | |
tree | a1fdce539da80b497bffe3a2c5cba868cb6755d8 /lib/kernel/src/logger_config.erl | |
parent | e5bbcfd47088162a1c349eeb5aa3c37d8263d274 (diff) | |
download | otp-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.erl | 8 |
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 |