From 2addcfebe26e14c08b988e17c0a1abfd92a8f7a3 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Fri, 4 Oct 2019 09:27:26 -0400 Subject: Reload logger config in CT suites Fixes #2159; this is done by force-reloading the handlers to match the config. This can create a bit of a funny effect if sys.config specifies an INFO log level (or lower) is specified. While apps are booted for config changes before the cth_failonly hook is enabled, supervision and other application log messages can start being output. They will start being suppressed once the CT run begins. This is not a bug, it's a race in instantiation of control and enabling of log levels. Nothing we can do about that. It might however surprise people a good bit. If non-default stdout handlers are added, they are similarly likely to become noisy; specifying a test-specific sys.config file may be necessary then. Also includes a bump of cth_readable version, which now checks for updates to the log formatter on every test output. --- src/rebar_prv_common_test.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/rebar_prv_common_test.erl b/src/rebar_prv_common_test.erl index c31c060..ea1477e 100644 --- a/src/rebar_prv_common_test.erl +++ b/src/rebar_prv_common_test.erl @@ -261,7 +261,7 @@ select_tests(State, ProjectApps, CmdOpts, CfgOpts) -> %% to our best ability. rebar_paths:set_paths([deps, plugins], State), [application:load(Application) || Config <- Configs, {Application, _} <- Config], - rebar_utils:reread_config(Configs), + rebar_utils:reread_config(Configs, [update_logger]), Opts = merge_opts(CmdOpts,CfgOpts), discover_tests(State, ProjectApps, Opts). -- cgit v1.1