diff options
author | Siri Hansen <[email protected]> | 2018-05-18 13:27:56 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2018-05-23 11:11:13 +0200 |
commit | cfbe1afe6ba1f1083c8aa41c7aeb422f253f5d23 (patch) | |
tree | e3cd42484d0d76b40e75e679fe4e41936b3bfc2f /lib/kernel/doc | |
parent | be959158a9ebe4b4ed8c336b969ac0c0e9399312 (diff) | |
download | otp-cfbe1afe6ba1f1083c8aa41c7aeb422f253f5d23.tar.gz otp-cfbe1afe6ba1f1083c8aa41c7aeb422f253f5d23.tar.bz2 otp-cfbe1afe6ba1f1083c8aa41c7aeb422f253f5d23.zip |
Add logger:update_formatter_config/2,3
Diffstat (limited to 'lib/kernel/doc')
-rw-r--r-- | lib/kernel/doc/src/logger.xml | 25 | ||||
-rw-r--r-- | lib/kernel/doc/src/logger_chapter.xml | 6 |
2 files changed, 28 insertions, 3 deletions
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 @@ -774,6 +774,31 @@ logger:set_handler_config(HandlerId,maps:merge(Old,Config)). </func> <func> + <name name="update_formatter_config" arity="2"/> + <fsummary>Update the formatter configuration for the specified handler.</fsummary> + <desc> + <p>Update the formatter configuration for the specified handler.</p> + <p>The new configuration is merged with the existing formatter + configuration.</p> + <p>To overwrite the existing configuration without any merge, + use <seealso marker="#set_handler_config-3"> + <c>set_handler_config(HandlerId,formatter, + {FormatterModule,FormatterConfig})</c></seealso>.</p> + </desc> + </func> + + <func> + <name name="update_formatter_config" arity="3"/> + <fsummary>Update the formatter configuration for the specified handler.</fsummary> + <desc> + <p>Update the formatter configuration for the specified handler.</p> + <p>This is equivalent + to <br/><seealso marker="#update_formatter_config-2"> + <c>update_formatter_config(<anno>HandlerId</anno>,#{<anno>Key</anno>=><anno>Value</anno>})</c></seealso></p> + </desc> + </func> + + <func> <name name="compare_levels" arity="2"/> <fsummary>Compare the severity of two log levels.</fsummary> <desc> 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 @@ <p>A formatter is defined as a module exporting the following function:</p> - <code>format(Log,Extra) -> unicode:chardata()</code> + <code>format(Log,FConfig) -> unicode:chardata()</code> <p>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 <c>ignore</c>.</p> <p>Default is <c>log</c>.</p> </item> - <tag><c>formatter = {Module::module(),Extra::term()}</c></tag> + <tag><c>formatter = {FModule::module(),FConfig::map()}</c></tag> <item> <p>See <seealso marker="#Formatter">Formatter</seealso> for more information.</p> <p>The default module is <seealso marker="logger_formatter"> - <c>logger_formatter</c></seealso>, and <c>Extra</c> is + <c>logger_formatter</c></seealso>, and <c>FConfig</c> is it's configuration map.</p> </item> <tag>HandlerConfig, <c>term() = term()</c></tag> |