From cfbe1afe6ba1f1083c8aa41c7aeb422f253f5d23 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Fri, 18 May 2018 13:27:56 +0200 Subject: Add logger:update_formatter_config/2,3 --- lib/kernel/doc/src/logger.xml | 25 +++++++++++++++++++++++++ lib/kernel/doc/src/logger_chapter.xml | 6 +++--- 2 files changed, 28 insertions(+), 3 deletions(-) (limited to 'lib/kernel/doc') diff --git a/lib/kernel/doc/src/logger.xml b/lib/kernel/doc/src/logger.xml index f7e740e90d..be733685cc 100644 --- a/lib/kernel/doc/src/logger.xml +++ b/lib/kernel/doc/src/logger.xml @@ -773,6 +773,31 @@ logger:set_handler_config(HandlerId,maps:merge(Old,Config)). + + + Update the formatter configuration for the specified handler. + +

Update the formatter configuration for the specified handler.

+

The new configuration is merged with the existing formatter + configuration.

+

To overwrite the existing configuration without any merge, + use + set_handler_config(HandlerId,formatter, + {FormatterModule,FormatterConfig}).

+
+
+ + + + Update the formatter configuration for the specified handler. + +

Update the formatter configuration for the specified handler.

+

This is equivalent + to
+ update_formatter_config(HandlerId,#{Key=>Value})

+
+
+ Compare the severity of two log levels. diff --git a/lib/kernel/doc/src/logger_chapter.xml b/lib/kernel/doc/src/logger_chapter.xml index 21b460e72a..522d0ce29d 100644 --- a/lib/kernel/doc/src/logger_chapter.xml +++ b/lib/kernel/doc/src/logger_chapter.xml @@ -157,7 +157,7 @@

A formatter is defined as a module exporting the following function:

- format(Log,Extra) -> unicode:chardata() + format(Log,FConfig) -> unicode:chardata()

The formatter callback is called by each handler, and the returned string can be printed to the handler's destination @@ -413,12 +413,12 @@ return ignore.

Default is log.

- formatter = {Module::module(),Extra::term()} + formatter = {FModule::module(),FConfig::map()}

See Formatter for more information.

The default module is - logger_formatter, and Extra is + logger_formatter, and FConfig is it's configuration map.

HandlerConfig, term() = term() -- cgit v1.2.3