From a0f5a03771e50e1f4a0722373e8823fc72aa5991 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Tue, 16 Apr 2013 14:51:17 +0200 Subject: [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. --- lib/common_test/src/cth_log_redirect.erl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/common_test/src/cth_log_redirect.erl') 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, -- cgit v1.2.3