diff options
author | Siri Hansen <[email protected]> | 2018-06-07 16:23:19 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2018-06-11 15:01:41 +0200 |
commit | c026109009942d7a877242f161860cc824223cf1 (patch) | |
tree | 44cae2092634830ecaab5732aacd7c142c8ebc6e /lib/kernel/test/logger_legacy_SUITE.erl | |
parent | b91eceaf71e0009346d119346a33894ed53be7b0 (diff) | |
download | otp-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/test/logger_legacy_SUITE.erl')
-rw-r--r-- | lib/kernel/test/logger_legacy_SUITE.erl | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/kernel/test/logger_legacy_SUITE.erl b/lib/kernel/test/logger_legacy_SUITE.erl index 180db9f51a..de73b6152a 100644 --- a/lib/kernel/test/logger_legacy_SUITE.erl +++ b/lib/kernel/test/logger_legacy_SUITE.erl @@ -70,6 +70,10 @@ init_per_group(std, Config) -> [{domain,{fun logger_filters:domain/2,{log,super,[otp]}}}]), Config; init_per_group(sasl, Config) -> + %% Since default level is notice, and progress reports are info, + %% we need to raise the global logger level to info in order to + %% receive these. + ok = logger:set_primary_config(level,info), ok = logger:set_handler_config( error_logger,filters, [{domain,{fun logger_filters:domain/2,{log,super,[otp,sasl]}}}]), @@ -77,13 +81,14 @@ init_per_group(sasl, Config) -> %% cth_log_redirect checks if sasl is started before displaying %% any sasl reports - so just to see the real sasl reports in tc %% log: - application:start(sasl), - Config; + {ok,Apps} = application:ensure_all_started(sasl), + [{stop_apps,Apps}|Config]; init_per_group(_Group, Config) -> Config. -end_per_group(sasl, _Config) -> - application:stop(sasl), +end_per_group(sasl, Config) -> + Apps = ?config(stop_apps,Config), + [application:stop(App) || App <- Apps], ok; end_per_group(_Group, _Config) -> ok. |