From 9095b3cd6d2f925065daf619d19d05551d31cd30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Thu, 30 Jun 2016 18:07:03 +0200 Subject: [PATCH] rabbit_ct_helpers: Lower importance of logged messages This allows to easily silence them without loosing too much information. --- src/rabbit_ct_helpers.erl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/rabbit_ct_helpers.erl b/src/rabbit_ct_helpers.erl index 6df2a03c..87b199ee 100644 --- a/src/rabbit_ct_helpers.erl +++ b/src/rabbit_ct_helpers.erl @@ -46,7 +46,7 @@ log_environment() -> Vars = lists:sort(fun(A, B) -> A =< B end, os:getenv()), - ct:pal("Environment variables:~n~s", [ + ct:pal(?LOW_IMPORTANCE, "Environment variables:~n~s", [ [io_lib:format(" ~s~n", [V]) || V <- Vars]]). run_setup_steps(Config) -> @@ -289,7 +289,7 @@ long_running_testsuite_monitor(TimerRef, Testcases) -> long_running_testsuite_monitor(TimerRef, Testcases1); ping_ct -> T1 = time_compat:monotonic_time(seconds), - ct:pal("Testcases still in progress:~s", + ct:pal(?STD_IMPORTANCE, "Testcases still in progress:~s", [[ begin TDiff = format_time_diff(T1, T0), @@ -435,7 +435,7 @@ exec([Cmd | Args], Options) when is_list(Cmd) orelse is_binary(Cmd) -> "~n") } end, - ct:pal(Log1, [string:join([Cmd1 | Args1], " "), self()]), + ct:pal(?LOW_IMPORTANCE, Log1, [string:join([Cmd1 | Args1], " "), self()]), Port = erlang:open_port( {spawn_executable, Cmd1}, [ {args, Args1}, @@ -459,9 +459,11 @@ port_receive_loop(Port, Stdout, Options) -> Stdout =:= "", if DropStdout -> - ct:pal("Exit code: ~p (pid ~p)", [X, self()]); + ct:pal(?LOW_IMPORTANCE, "Exit code: ~p (pid ~p)", + [X, self()]); true -> - ct:pal("~s~nExit code: ~p (pid ~p)", [Stdout, X, self()]) + ct:pal(?LOW_IMPORTANCE, "~s~nExit code: ~p (pid ~p)", + [Stdout, X, self()]) end, case proplists:get_value(match_stdout, Options) of undefined ->