From a006915a4f3ebbff84ccc83fb87f0283ebe49e8e Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Wed, 3 Oct 2018 12:41:28 +0200 Subject: [logger] Add update_handler_config/3 This function is similar to set_handler_config/3, but calls the handler callback changing_config/3 with the first parameter SetOrUpdate=update. --- lib/kernel/doc/src/logger.xml | 48 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) (limited to 'lib/kernel/doc/src/logger.xml') diff --git a/lib/kernel/doc/src/logger.xml b/lib/kernel/doc/src/logger.xml index 8f54d0e54f..aa6e17f27b 100644 --- a/lib/kernel/doc/src/logger.xml +++ b/lib/kernel/doc/src/logger.xml @@ -748,6 +748,14 @@ start(_, []) -> exists, its associated value will be changed to the given value. If it does not exist, it will be added.

+

If the value is incomplete, which for example can be the + case for the config key, it is up to the handler + implementation how the unspecified parts are set. For all + handlers in the Kernel application, unspecified data for + the config key is set to default values. To update + only specified data, and keep the existing configuration for + the rest, use + update_handler_config/3.

See the definition of the handler_config() type for more @@ -932,6 +940,42 @@ logger:set_handler_config(HandlerId, maps:merge(Old, Config)). + + + + + + + Add or update configuration data for the specified + handler. + + + + + + + + +

Add or update configuration data for the specified + handler. If the given Key already + exists, its associated value will be changed + to the given value. If it does not exist, it will + be added.

+

If the value is incomplete, which for example can be the + case for the config key, it is up to the handler + implementation how the unspecified parts are set. For all + handlers in the Kernel application, unspecified data for + the config key is not changed. To reset unspecified + data to default values, + use + set_handler_config/3.

+

See the definition of + the + handler_config() type for more + information about the different parameters.

+ + + Update primary configuration data for Logger. @@ -1063,7 +1107,7 @@ logger:set_process_metadata(maps:merge(logger:get_process_metadata(), Meta)). set_handler_config/2,3, and update if it originates from - update_handler_config/2. The handler can + update_handler_config/2,3. The handler can use this parameteter to decide how to update the value of the config field, that is, the handler specific configuration data. Typically, if SetOrUpdate @@ -1150,7 +1194,7 @@ logger:set_process_metadata(maps:merge(logger:get_process_metadata(), Meta)). logger:set_handler_config/2,3 - logger:updata_handler_config/2 + logger:updata_handler_config/2,3 logger:update_formatter_config/2 -- cgit v1.2.3