aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/ct_logs.erl
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2016-10-17 14:52:59 +0200
committerPeter Andersson <[email protected]>2016-10-24 11:35:27 +0200
commit349c39e875e0af1bf42dcbc171a47d824401840e (patch)
treeb1e73edc9b7618e2f0109d997a300608cde38a3b /lib/common_test/src/ct_logs.erl
parent1550204bed17ecdcc59a53332bcdfa2ba246944a (diff)
downloadotp-349c39e875e0af1bf42dcbc171a47d824401840e.tar.gz
otp-349c39e875e0af1bf42dcbc171a47d824401840e.tar.bz2
otp-349c39e875e0af1bf42dcbc171a47d824401840e.zip
Fix problem with printouts to incorrect parent group leader
Diffstat (limited to 'lib/common_test/src/ct_logs.erl')
-rw-r--r--lib/common_test/src/ct_logs.erl13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/common_test/src/ct_logs.erl b/lib/common_test/src/ct_logs.erl
index 9282a9f81d..0daed60dba 100644
--- a/lib/common_test/src/ct_logs.erl
+++ b/lib/common_test/src/ct_logs.erl
@@ -531,8 +531,13 @@ tc_print(Category,Importance,Format,Args) ->
Val
end,
if Importance >= (100-VLvl) ->
- Head = get_heading(Category),
- io:format(user, lists:concat([Head,Format,"\n\n"]), Args),
+ Str = lists:concat([get_heading(Category),Format,"\n\n"]),
+ try
+ io:format(?def_gl, Str, Args)
+ catch
+ %% default group leader probably not started, or has stopped
+ _:_ -> io:format(user, Str, Args)
+ end,
ok;
true ->
ok
@@ -679,7 +684,7 @@ logger(Parent, Mode, Verbosity) ->
PrivFilesDestRun = [filename:join(AbsDir, F) || F <- PrivFiles],
case copy_priv_files(PrivFilesSrc, PrivFilesDestTop) of
{error,Src1,Dest1,Reason1} ->
- io:format(user, "ERROR! "++
+ io:format(?def_gl, "ERROR! "++
"Priv file ~p could not be copied to ~p. "++
"Reason: ~p~n",
[Src1,Dest1,Reason1]),
@@ -687,7 +692,7 @@ logger(Parent, Mode, Verbosity) ->
ok ->
case copy_priv_files(PrivFilesSrc, PrivFilesDestRun) of
{error,Src2,Dest2,Reason2} ->
- io:format(user,
+ io:format(?def_gl,
"ERROR! "++
"Priv file ~p could not be copied to ~p. "
++"Reason: ~p~n",