diff options
author | Siri Hansen <[email protected]> | 2018-09-04 14:30:49 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2018-09-12 14:58:02 +0200 |
commit | d9e58a29f9194ea8b2d9e1bdcf5b89a9cc29f988 (patch) | |
tree | 501533694e789d878476708236dc17ee5b255c7d /lib/kernel/doc | |
parent | 96c1aa0041b368afceef0aef88e82a6c9f8e901d (diff) | |
download | otp-d9e58a29f9194ea8b2d9e1bdcf5b89a9cc29f988.tar.gz otp-d9e58a29f9194ea8b2d9e1bdcf5b89a9cc29f988.tar.bz2 otp-d9e58a29f9194ea8b2d9e1bdcf5b89a9cc29f988.zip |
[logger] Update doc about file options in logger_std_h
Diffstat (limited to 'lib/kernel/doc')
-rw-r--r-- | lib/kernel/doc/src/logger_std_h.xml | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/lib/kernel/doc/src/logger_std_h.xml b/lib/kernel/doc/src/logger_std_h.xml index b526ed037d..fcd8189bae 100644 --- a/lib/kernel/doc/src/logger_std_h.xml +++ b/lib/kernel/doc/src/logger_std_h.xml @@ -59,13 +59,22 @@ <item> <p>This has the value <c>standard_io</c>, <c>standard_error</c>, <c>{file,LogFileName}</c>, or <c>{file,LogFileName,LogFileOpts}</c>.</p> + <p>If <c>LogFileOpts</c> is specified, it replaces the default + list of options used when opening the log file. The default + list is <c>[raw,append,delayed_write]</c>. One reason to do + so can be to change <c>append</c> to, for + example, <c>write</c>, ensuring that the old log is + truncated when a node is restarted. See the reference manual + for <seealso marker="file#open-2"><c>file:open/2</c></seealso> + for more information about file options.</p> + <p>Log files are always UTF-8 encoded. The encoding can not be + changed by setting the option <c>{encoding,Encoding}</c> + in <c>LogFileOpts</c>.</p> + <p>Notice that the standard handler does not have support for + circular logging. Use the disk_log handler, + <seealso marker="logger_disk_log_h"><c>logger_disk_log_h</c></seealso>, + for this.</p> <p> Defaults to <c>standard_io</c>.</p> - <p>It is recommended not to specify <c>LogFileOpts</c> unless absolutely - necessary. The default options used by the handler to open a file for logging are - <c>raw</c>, <c>append</c>, and <c>delayed_write</c>. Notice that the standard - handler does not have support for circular logging. Use the disk_log handler, - <seealso marker="logger_disk_log_h"><c>logger_disk_log_h</c></seealso>, - for this.</p> </item> <tag><c>filesync_repeat_interval</c></tag> <item> @@ -73,12 +82,12 @@ a file sync operation to write buffered data to disk. The handler attempts the operation repeatedly, but only performs a new sync if something has actually been logged.</p> - <p>Defaults to <c>5000</c> milliseconds.</p> <p>If <c>no_repeat</c> is set as value, the repeated file sync operation is disabled, and it is the operating system settings that determine how quickly or slowly data is written to disk. The user can also call the <seealso marker="logger_std_h#filesync-1"><c>filesync/1</c></seealso> function to perform a file sync.</p> + <p>Defaults to <c>5000</c> milliseconds.</p> </item> </taglist> <p>Other configuration parameters exist, to be used for customizing |