diff options
author | Siri Hansen <[email protected]> | 2018-10-03 12:21:23 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2018-10-03 13:06:25 +0200 |
commit | 6fae4fbd3650366730d35988ee588c32848dbecc (patch) | |
tree | d204f1bf65439f6da5a3ec35e491bd4385752530 /lib/kernel/doc/src/logger.xml | |
parent | 1838418b9193140f6ba5f5716884b62aad7b662d (diff) | |
download | otp-6fae4fbd3650366730d35988ee588c32848dbecc.tar.gz otp-6fae4fbd3650366730d35988ee588c32848dbecc.tar.bz2 otp-6fae4fbd3650366730d35988ee588c32848dbecc.zip |
[logger] Add handler callback filter_config/1
This function is called when a logger API function for fetching
handler configuration is called. The point is to allow the handler to
remove internal data fields that it might have stored in the
configuration database, before returning the handler configuration to
the caller.
An example of such internal data are the 'handler_pid' and 'mode_tab'
fields that logger_std_h and logger_disk_log_h store in their
configuration maps.
Diffstat (limited to 'lib/kernel/doc/src/logger.xml')
-rw-r--r-- | lib/kernel/doc/src/logger.xml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/kernel/doc/src/logger.xml b/lib/kernel/doc/src/logger.xml index aa6e17f27b..2bcf137299 100644 --- a/lib/kernel/doc/src/logger.xml +++ b/lib/kernel/doc/src/logger.xml @@ -1123,6 +1123,26 @@ logger:set_process_metadata(maps:merge(logger:get_process_metadata(), Meta)). </func> <func> + <name>HModule:filter_config(Config) -> FilteredConfig</name> + <fsummary>Remove internal data from configuration.</fsummary> + <type> + <v>Config = FilteredConfig = + <seealso marker="#type-handler_config">handler_config()</seealso></v> + </type> + <desc> + <p>This callback function is optional.</p> + <p>The function is called when one of the Logger API functions + for fetching the handler configuration is called, for + example + <seealso marker="#get_handler_config-1"> + <c>logger:get_handler_config/1</c></seealso>.</p> + <p>It allows the handler to remove internal data fields from + its configuration data before it is returned to the + caller.</p> + </desc> + </func> + + <func> <name>HModule:log(LogEvent, Config) -> void()</name> <fsummary>Log the given log event.</fsummary> <type> |