aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/logger_h_common.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2018-05-24 15:56:07 +0200
committerSiri Hansen <[email protected]>2018-05-24 15:56:07 +0200
commit4f91c8a34f4cc2c728a63e8d218566b3b3795b10 (patch)
tree689a206967ccdbf98e2ecf3d67ffa9ab2fcf0a35 /lib/kernel/src/logger_h_common.erl
parent5c1d8ed81e66ef4977b7b68f573862bcbb9da7ca (diff)
parent53539ee751da408029c9dfae80384fdec6c7a552 (diff)
downloadotp-4f91c8a34f4cc2c728a63e8d218566b3b3795b10.tar.gz
otp-4f91c8a34f4cc2c728a63e8d218566b3b3795b10.tar.bz2
otp-4f91c8a34f4cc2c728a63e8d218566b3b3795b10.zip
Merge branch 'siri/logger-fix'
* siri/logger-fix: Update documentation of logger and error_logger Change type name logger:log() to logger:log_event() Update preloaded Update primary bootstrap Rename module logger_simple to logger_simple_h Change env var logger_log_progress to logger_progress_reports Remove HandlerId from handler callback functions and add it to Config Change handler id for sasl handler from sasl_h to sasl Change Compare parameter to logger_filters:domain/2 Update Logger documentation Rename reset_module_level to unset_module_level Allow chars_limit to limit strings Add logger:update_formatter_config/2,3 Set legacy_header=true for kernel's default handler only Improve documentation of logger and error_logger Use system_time instead of monotonic_time as timestamp in logger
Diffstat (limited to 'lib/kernel/src/logger_h_common.erl')
-rw-r--r--lib/kernel/src/logger_h_common.erl10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/kernel/src/logger_h_common.erl b/lib/kernel/src/logger_h_common.erl
index 901c4c0dad..336398cd4a 100644
--- a/lib/kernel/src/logger_h_common.erl
+++ b/lib/kernel/src/logger_h_common.erl
@@ -39,8 +39,8 @@
%%%-----------------------------------------------------------------
%%% Covert log data on any form to binary
--spec log_to_binary(Log,Config) -> LogString when
- Log :: logger:log(),
+-spec log_to_binary(LogEvent,Config) -> LogString when
+ LogEvent :: logger:log_event(),
Config :: logger:config(),
LogString :: binary().
log_to_binary(#{msg:={report,_},meta:=#{report_cb:=_}}=Log,Config) ->
@@ -58,7 +58,7 @@ do_log_to_binary(Log,Config) ->
catch _:_ ->
?LOG_INTERNAL(debug,[{formatter_error,Formatter},
{config,FormatterConfig},
- {log,Log},
+ {log_event,Log},
{bad_return_value,String}]),
<<"FORMATTER ERROR: bad_return_value">>
end.
@@ -69,10 +69,10 @@ try_format(Log,Formatter,FormatterConfig) ->
C:R:S ->
?LOG_INTERNAL(debug,[{formatter_crashed,Formatter},
{config,FormatterConfig},
- {log,Log},
+ {log_event,Log},
{reason,
{C,R,logger:filter_stacktrace(?MODULE,S)}}]),
- case {?DEFAULT_FORMATTER,?DEFAULT_FORMAT_CONFIG} of
+ case {?DEFAULT_FORMATTER,#{}} of
{Formatter,FormatterConfig} ->
"DEFAULT FORMATTER CRASHED";
{DefaultFormatter,DefaultConfig} ->