aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/cth_log_redirect.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2013-04-16 14:51:17 +0200
committerSiri Hansen <[email protected]>2013-04-16 14:51:17 +0200
commita0f5a03771e50e1f4a0722373e8823fc72aa5991 (patch)
tree4fcc987fb710af9911e47e51f61a26acaf84a968 /lib/common_test/src/cth_log_redirect.erl
parent74fdfd48d59393b6f0dfb53f343645133675c64b (diff)
downloadotp-a0f5a03771e50e1f4a0722373e8823fc72aa5991.tar.gz
otp-a0f5a03771e50e1f4a0722373e8823fc72aa5991.tar.bz2
otp-a0f5a03771e50e1f4a0722373e8823fc72aa5991.zip
[common_test] Use max importance when logging errors
This commit adds ?MAX_IMPORTANCE to error notifications in the test case log, and it makes sure that the printout says "CT Error Notification". Printouts from cth_log_redirect (sasl and error_reports) uses ?STD_IMPORTANCE and states "System" in the printout.
Diffstat (limited to 'lib/common_test/src/cth_log_redirect.erl')
-rw-r--r--lib/common_test/src/cth_log_redirect.erl8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/common_test/src/cth_log_redirect.erl b/lib/common_test/src/cth_log_redirect.erl
index 78ae70f37e..958b7a94c7 100644
--- a/lib/common_test/src/cth_log_redirect.erl
+++ b/lib/common_test/src/cth_log_redirect.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -33,6 +33,8 @@
handle_event/2, handle_call/2, handle_info/2,
terminate/1]).
+-include("ct.hrl").
+
id(_Opts) ->
?MODULE.
@@ -78,7 +80,7 @@ handle_event(Event, LogFunc) ->
SReport = sasl_report:format_report(group_leader(), ErrLogType,
tag_event(Event)),
if is_list(SReport) ->
- ct_logs:LogFunc(sasl, SReport, []);
+ ct_logs:LogFunc(sasl, ?STD_IMPORTANCE, "System", SReport, []);
true -> %% Report is an atom if no logging is to be done
ignore
end
@@ -86,7 +88,7 @@ handle_event(Event, LogFunc) ->
EReport = error_logger_tty_h:write_event(
tag_event(Event),io_lib),
if is_list(EReport) ->
- ct_logs:LogFunc(error_logger, EReport, []);
+ ct_logs:LogFunc(error_logger, ?STD_IMPORTANCE, "System", EReport, []);
true -> %% Report is an atom if no logging is to be done
ignore
end,