diff options
Diffstat (limited to 'lib/common_test/src/ct_conn_log_h.erl')
-rw-r--r-- | lib/common_test/src/ct_conn_log_h.erl | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/common_test/src/ct_conn_log_h.erl b/lib/common_test/src/ct_conn_log_h.erl index 5239ec1ff8..f7615fdc14 100644 --- a/lib/common_test/src/ct_conn_log_h.erl +++ b/lib/common_test/src/ct_conn_log_h.erl @@ -116,9 +116,14 @@ write_report(Time,#conn_log{module=ConnMod}=Info,Data,GL,State) -> {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)]) + case format_data(ConnMod,LogType,Data) of + [] -> + ok; + FormattedData -> + io:format(Fd,"~n~ts~ts~ts",[format_head(ConnMod,LogType,Time), + format_title(LogType,Info), + FormattedData]) + end end. write_error(Time,#conn_log{module=ConnMod}=Info,Report,GL,State) -> |