diff options
author | Siri Hansen <[email protected]> | 2019-02-22 14:26:07 +0100 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2019-02-22 14:26:07 +0100 |
commit | 00678f41aaa14191dc333596fee33075ce515e24 (patch) | |
tree | a0b89d879ba052248c54f454dfd44ac33b0527c2 /lib/kernel/src/code_server.erl | |
parent | 9fc7abf9e8741552d11a64470b3c489120d069b1 (diff) | |
download | otp-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.erl | 10 |
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. |