aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/doc/src/logger_std_h.xml
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2018-05-08 16:13:50 +0200
committerLukas Larsson <[email protected]>2018-05-21 17:43:52 +0200
commit395dbad6bcc38c3384840674f40657273b05b14a (patch)
tree931ec833578d1f46dc5b642dadd17e613d1d3785 /lib/kernel/doc/src/logger_std_h.xml
parent5ec78bc5314f5b32ba28bae4d95f12ffa28469ca (diff)
downloadotp-395dbad6bcc38c3384840674f40657273b05b14a.tar.gz
otp-395dbad6bcc38c3384840674f40657273b05b14a.tar.bz2
otp-395dbad6bcc38c3384840674f40657273b05b14a.zip
logger: Rework configuration of logger
Most logger configuration that was possible through kernel application variables have been moved into a common 'logger' application environment in kernel. Now all the configuration possible through the logger API can be done as sys config. The handler started by kernel has been renamed to 'default' instead of logger_std_h. There is a new logger:setup_handlers/1 function that given an application name can be used to setup handlers in other applications.
Diffstat (limited to 'lib/kernel/doc/src/logger_std_h.xml')
-rw-r--r--lib/kernel/doc/src/logger_std_h.xml11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/kernel/doc/src/logger_std_h.xml b/lib/kernel/doc/src/logger_std_h.xml
index fe9b9ca5a9..bf23d874c8 100644
--- a/lib/kernel/doc/src/logger_std_h.xml
+++ b/lib/kernel/doc/src/logger_std_h.xml
@@ -40,7 +40,7 @@
application. Multiple instances of this handler can be added to
logger, and each instance will print logs to <c>standard_io</c>,
<c>standard_error</c> or to file. The default instance that starts
- with kernel is named <c>logger_std_h</c> - which is the name to be used
+ with kernel is named <c>default</c> - which is the name to be used
for reconfiguration.</p>
<p>The handler has an overload protection mechanism that will keep the handler
process and the kernel application alive during a high load of log
@@ -57,7 +57,7 @@
are stored in a sub map with the key <c>logger_std_h</c>. The following
keys and values may be specified:</p>
<taglist>
- <tag><c>type</c></tag>
+ <tag><marker id="type"/><c>type</c></tag>
<item>
<p>This will have the value <c>standard_io</c>, <c>standard_error</c>,
<c>{file,LogFileName}</c>, or <c>{file,LogFileName,LogFileOpts}</c>,
@@ -105,11 +105,10 @@ logger:add_handler(my_standard_h, logger_std_h,
</code>
<p>In order to configure the default handler (that starts initially with
the kernel application) to log to file instead of <c>standard_io</c>,
- use the kernel configuration parameter
- <seealso marker="kernel_app#configuration"><c>logger_dest</c></seealso> with
- value <c>{file,FileName}</c>. Example:</p>
+ change the Kernel default logger to use a file. Example:</p>
<code type="none">
-erl -kernel logger_dest '{file,"./erl.log"}'
+erl -kernel logger '[{handler,default,logger_std_h,
+ #{ logger_std_h => #{ type => {file,"./log.log"}}}}]'
</code>
<p>An example of how to replace the standard handler with a disk_log handler
at startup can be found in the manual of