summaryrefslogtreecommitdiff
path: root/src/rebar_prv_common_test.erl
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2019-10-04 09:27:26 -0400
committerFred Hebert <mononcqc@ferd.ca>2019-10-04 09:27:26 -0400
commit2addcfebe26e14c08b988e17c0a1abfd92a8f7a3 (patch)
tree17078775bf2e1aabebd4ea709056d99794ad860d /src/rebar_prv_common_test.erl
parente2ac32175806a80a3a92f1e5f554ee7688259350 (diff)
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.
Diffstat (limited to 'src/rebar_prv_common_test.erl')
-rw-r--r--src/rebar_prv_common_test.erl2
1 files changed, 1 insertions, 1 deletions
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).