Skip to content
This repository was archived by the owner on Nov 17, 2020. It is now read-only.

Commit 9095b3c

Browse files
committed
rabbit_ct_helpers: Lower importance of logged messages
This allows to easily silence them without loosing too much information.
1 parent 004a3d8 commit 9095b3c

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/rabbit_ct_helpers.erl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
log_environment() ->
4848
Vars = lists:sort(fun(A, B) -> A =< B end, os:getenv()),
49-
ct:pal("Environment variables:~n~s", [
49+
ct:pal(?LOW_IMPORTANCE, "Environment variables:~n~s", [
5050
[io_lib:format(" ~s~n", [V]) || V <- Vars]]).
5151

5252
run_setup_steps(Config) ->
@@ -289,7 +289,7 @@ long_running_testsuite_monitor(TimerRef, Testcases) ->
289289
long_running_testsuite_monitor(TimerRef, Testcases1);
290290
ping_ct ->
291291
T1 = time_compat:monotonic_time(seconds),
292-
ct:pal("Testcases still in progress:~s",
292+
ct:pal(?STD_IMPORTANCE, "Testcases still in progress:~s",
293293
[[
294294
begin
295295
TDiff = format_time_diff(T1, T0),
@@ -435,7 +435,7 @@ exec([Cmd | Args], Options) when is_list(Cmd) orelse is_binary(Cmd) ->
435435
"~n")
436436
}
437437
end,
438-
ct:pal(Log1, [string:join([Cmd1 | Args1], " "), self()]),
438+
ct:pal(?LOW_IMPORTANCE, Log1, [string:join([Cmd1 | Args1], " "), self()]),
439439
Port = erlang:open_port(
440440
{spawn_executable, Cmd1}, [
441441
{args, Args1},
@@ -459,9 +459,11 @@ port_receive_loop(Port, Stdout, Options) ->
459459
Stdout =:= "",
460460
if
461461
DropStdout ->
462-
ct:pal("Exit code: ~p (pid ~p)", [X, self()]);
462+
ct:pal(?LOW_IMPORTANCE, "Exit code: ~p (pid ~p)",
463+
[X, self()]);
463464
true ->
464-
ct:pal("~s~nExit code: ~p (pid ~p)", [Stdout, X, self()])
465+
ct:pal(?LOW_IMPORTANCE, "~s~nExit code: ~p (pid ~p)",
466+
[Stdout, X, self()])
465467
end,
466468
case proplists:get_value(match_stdout, Options) of
467469
undefined ->

0 commit comments

Comments
 (0)