aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/code_server.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2019-02-22 14:26:07 +0100
committerSiri Hansen <[email protected]>2019-02-22 14:26:07 +0100
commit00678f41aaa14191dc333596fee33075ce515e24 (patch)
treea0b89d879ba052248c54f454dfd44ac33b0527c2 /lib/kernel/src/code_server.erl
parent9fc7abf9e8741552d11a64470b3c489120d069b1 (diff)
downloadotp-00678f41aaa14191dc333596fee33075ce515e24.tar.gz
otp-00678f41aaa14191dc333596fee33075ce515e24.tar.bz2
otp-00678f41aaa14191dc333596fee33075ce515e24.zip
[logger] Change timestamp from erlang:system_time to os:system_time
This is to align the timestamps with external logs.
Diffstat (limited to 'lib/kernel/src/code_server.erl')
-rw-r--r--lib/kernel/src/code_server.erl10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/kernel/src/code_server.erl b/lib/kernel/src/code_server.erl
index 1b4a67ecb7..68e1205301 100644
--- a/lib/kernel/src/code_server.erl
+++ b/lib/kernel/src/code_server.erl
@@ -1434,19 +1434,25 @@ all_loaded(Db) ->
-spec error_msg(io:format(), [term()]) -> 'ok'.
error_msg(Format, Args) ->
+ %% This is equal to calling logger:error/3 which we don't want to
+ %% do from code_server. We don't want to call logger:timestamp()
+ %% either.
logger ! {log,error,Format,Args,
#{pid=>self(),
gl=>group_leader(),
- time=>erlang:system_time(microsecond),
+ time=>os:system_time(microsecond),
error_logger=>#{tag=>error}}},
ok.
-spec info_msg(io:format(), [term()]) -> 'ok'.
info_msg(Format, Args) ->
+ %% This is equal to calling logger:info/3 which we don't want to
+ %% do from code_server. We don't want to call logger:timestamp()
+ %% either.
logger ! {log,info,Format,Args,
#{pid=>self(),
gl=>group_leader(),
- time=>erlang:system_time(microsecond),
+ time=>os:system_time(microsecond),
error_logger=>#{tag=>info_msg}}},
ok.