aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2016-06-13 14:07:51 +0200
committerPeter Andersson <[email protected]>2016-06-13 14:07:51 +0200
commite3fd5673dfb8542fe34ec490c4c788c21b20ef69 (patch)
treedee84645da6d006a9d3d03effbd3ab7dd4dbba32 /lib/common_test/src
parent39c6338a1b671a98cc2c8d21e9ba373816e5071a (diff)
downloadotp-e3fd5673dfb8542fe34ec490c4c788c21b20ef69.tar.gz
otp-e3fd5673dfb8542fe34ec490c4c788c21b20ef69.tar.bz2
otp-e3fd5673dfb8542fe34ec490c4c788c21b20ef69.zip
Fix problem with incorrect type of timestamps
OTP-13615
Diffstat (limited to 'lib/common_test/src')
-rw-r--r--lib/common_test/src/cth_log_redirect.erl9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/common_test/src/cth_log_redirect.erl b/lib/common_test/src/cth_log_redirect.erl
index 33a3813a16..6d77d7ee9e 100644
--- a/lib/common_test/src/cth_log_redirect.erl
+++ b/lib/common_test/src/cth_log_redirect.erl
@@ -127,7 +127,7 @@ handle_event(Event, #eh_state{log_func = LogFunc} = State) ->
_Else ->
{ok, ErrLogType} = application:get_env(sasl, errlog_type),
SReport = sasl_report:format_report(group_leader(), ErrLogType,
- tag_event(Event)),
+ tag_event(Event, local)),
if is_list(SReport) ->
SaslHeader = format_header(State),
case LogFunc of
@@ -142,8 +142,9 @@ handle_event(Event, #eh_state{log_func = LogFunc} = State) ->
ignore
end
end,
+ %% note that error_logger (unlike sasl) expects UTC time
EReport = error_logger_tty_h:write_event(
- tag_event(Event),io_lib),
+ tag_event(Event, utc), io_lib),
if is_list(EReport) ->
ErrHeader = format_header(State),
case LogFunc of
@@ -220,7 +221,9 @@ terminate(_) ->
terminate(_Arg, _State) ->
ok.
-tag_event(Event) ->
+tag_event(Event, utc) ->
+ {calendar:universal_time(), Event};
+tag_event(Event, _) ->
{calendar:local_time(), Event}.
set_curr_func(CurrFunc, Config) ->