diff options
author | Siri Hansen <[email protected]> | 2015-12-03 10:53:50 +0100 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2015-12-03 10:53:50 +0100 |
commit | 8afd734873f136bebfe92eaa0f09299250058d85 (patch) | |
tree | a4856480ce895314632a533b242f1c09c61e5851 | |
parent | c253a20d3bc4335498b4e2d02948e631a4d74afa (diff) | |
parent | c2548c79af951a8628b3e44de79652bc923188f0 (diff) | |
download | otp-8afd734873f136bebfe92eaa0f09299250058d85.tar.gz otp-8afd734873f136bebfe92eaa0f09299250058d85.tar.bz2 otp-8afd734873f136bebfe92eaa0f09299250058d85.zip |
Merge branch 'maint'
-rw-r--r-- | lib/common_test/src/ct_conn_log_h.erl | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/lib/common_test/src/ct_conn_log_h.erl b/lib/common_test/src/ct_conn_log_h.erl index 2dd4fdac05..5239ec1ff8 100644 --- a/lib/common_test/src/ct_conn_log_h.erl +++ b/lib/common_test/src/ct_conn_log_h.erl @@ -104,18 +104,26 @@ terminate(_,#state{logs=Logs}) -> %%%----------------------------------------------------------------- %%% Writing reports write_report(_Time,#conn_log{header=false,module=ConnMod}=Info,Data,GL,State) -> - {LogType,Fd} = get_log(Info,GL,State), - io:format(Fd,"~n~ts",[format_data(ConnMod,LogType,Data)]); + case get_log(Info,GL,State) of + {silent,_} -> + ok; + {LogType,Fd} -> + io:format(Fd,"~n~ts",[format_data(ConnMod,LogType,Data)]) + end; write_report(Time,#conn_log{module=ConnMod}=Info,Data,GL,State) -> - {LogType,Fd} = get_log(Info,GL,State), - io:format(Fd,"~n~ts~ts~ts",[format_head(ConnMod,LogType,Time), - format_title(LogType,Info), - format_data(ConnMod,LogType,Data)]). + case get_log(Info,GL,State) of + {silent,_} -> + ok; + {LogType,Fd} -> + io:format(Fd,"~n~ts~ts~ts",[format_head(ConnMod,LogType,Time), + format_title(LogType,Info), + format_data(ConnMod,LogType,Data)]) + end. write_error(Time,#conn_log{module=ConnMod}=Info,Report,GL,State) -> case get_log(Info,GL,State) of - {html,_} -> + {LogType,_} when LogType==html; LogType==silent -> %% The error will anyway be written in the html log by the %% sasl error handler, so don't write it again. ok; |