diff options
author | Siri Hansen <[email protected]> | 2019-01-21 14:26:07 +0100 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2019-01-21 14:26:07 +0100 |
commit | a8364425a7190b65cd33e58ac3c155a77c462b74 (patch) | |
tree | c659252e6397483d1f1771485cfee80b198a3fbb /lib/kernel/doc/src/logger_chapter.xml | |
parent | a5682ac818347a5091ba7dbc88928e8a634f15ec (diff) | |
parent | f7123f64f6fa1727b49648e4335720910d8f10bf (diff) | |
download | otp-a8364425a7190b65cd33e58ac3c155a77c462b74.tar.gz otp-a8364425a7190b65cd33e58ac3c155a77c462b74.tar.bz2 otp-a8364425a7190b65cd33e58ac3c155a77c462b74.zip |
Merge branch 'siri/logger/erts-and-remote-log-olp' into maint
* siri/logger/erts-and-remote-log-olp:
[logger] Update bench marks to report percent instead of 0.XX
[logger] Minor fix in logger_olp_SUITE to avoid error in end_per_testcase
[logger] Remove info and reset functions from handler modules
[logger] Remove some unused variable warnings
[logger] Store proxy config in logger ets table
[logger] Log mode change and flushes in logger_proxy
[logger] Move out overload protection macros from logger_h_common.hrl
[logger] Allow logger_olp callbacks to return {stop,...}
Add logger_stress_SUITE to benchmarks spec
[logger] Add idle timer in logger_olp
[logger] Use persistent_term for storing proxy reference
Update preloaded
Use system_time instead of monotonic_time in log events
[logger] Add test for restart of logger proxy
[logger] Add API function for configuring logger proxy
[logger] Add logger_stress_SUITE
[logger] Add tests for logger_proxy
[logger] Overload protect logging from erts and remote nodes
[logger] Split overload protection functionality to own module
Diffstat (limited to 'lib/kernel/doc/src/logger_chapter.xml')
-rw-r--r-- | lib/kernel/doc/src/logger_chapter.xml | 55 |
1 files changed, 53 insertions, 2 deletions
diff --git a/lib/kernel/doc/src/logger_chapter.xml b/lib/kernel/doc/src/logger_chapter.xml index 458e61cef5..5ed7397135 100644 --- a/lib/kernel/doc/src/logger_chapter.xml +++ b/lib/kernel/doc/src/logger_chapter.xml @@ -693,8 +693,10 @@ logger:debug(#{got => connection_request, id => Id, state => State}, with <seealso marker="#logger_sasl_compatible"> <c>logger_sasl_compatible</c></seealso>.</p> <p>With this parameter, you can modify or disable the default - handler, add custom handlers and primary logger filters, and - set log levels per module.</p> + handler, add custom handlers and primary logger filters, set + log levels per module, and modify + the <seealso marker="#proxy">proxy</seealso> + configuration.</p> <p><c>Config</c> is any (zero or more) of the following:</p> <taglist> <tag><c>{handler, default, undefined}</c></tag> @@ -746,6 +748,14 @@ logger:debug(#{got => connection_request, id => Id, state => State}, <p>for each <c>Module</c>.</p> <p>Multiple entries of this type are allowed.</p> </item> + <tag><c>{proxy, ProxyConfig}</c></tag> + <item> + <p>Sets the proxy configuration, equivalent to calling</p> + <pre><seealso marker="logger#set_proxy_config/1"> + logger:set_proxy_config(ProxyConfig) + </seealso></pre> + <p>Only one entry of this type is allowed.</p> + </item> </taglist> <p>See section <seealso marker="#config_examples">Configuration @@ -1334,9 +1344,50 @@ logger:add_handler(my_disk_log_h, logger_disk_log_h, </section> <section> + <marker id="proxy"/> + <title>Logger Proxy</title> + <p>The Logger proxy is an Erlang process which is part of the + Kernel application's supervision tree. During startup, the proxy + process registers itself as the <c>system_logger</c>, meaning + that log events produced by the emulator are sent to this + process.</p> + <p>When a log event is issued on a process which has its group + leader on a remote node, Logger automatically forwards the log + event to the group leader's node. To achieve this, it first + sends the log event as an Erlang message from the original + client process to the proxy on the local node, and the proxy in + turn forwards the event to the proxy on the remote node.</p> + <p>When receiving a log event, either from the emulator or from a + remote node, the proxy calls the Logger API to log the event.</p> + <p>The proxy process is overload protected in the same way as + described in + section <seealso marker="#overload_protection">Protecting the + Handler from Overload</seealso>, but with the following default + values:</p> + <code> + #{sync_mode_qlen => 500, + drop_mode_qlen => 1000, + flush_qlen => 5000, + burst_limit_enable => false, + overload_kill_enable => false}</code> + <p>For log events from the emulator, synchronous message passing + mode is not applicable, since all messages are passed + asynchronously by the emulator. Drop mode is achieved by setting + the <c>system_logger</c> to <c>undefined</c>, forcing the + emulator to drop events until it is set back to the proxy pid + again.</p> + <p>The proxy uses <seealso marker="erts:erlang#send_nosuspend/2"> + <c>erlang:send_nosuspend/2</c></seealso> when sending log + events to a remote node. If the message could not be sent + without suspending the sender, it is dropped. This is to avoid + blocking the proxy process.</p> + </section> + + <section> <title>See Also</title> <p> <seealso marker="disk_log"><c>disk_log(3)</c></seealso>, + <seealso marker="erts:erlang"><c>erlang(3)</c></seealso>, <seealso marker="error_logger"><c>error_logger(3)</c></seealso>, <seealso marker="logger"><c>logger(3)</c></seealso>, <seealso marker="logger_disk_log_h"><c>logger_disk_log_h(3)</c></seealso>, |