aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/doc/src/logger_std_h.xml
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2019-03-05 11:25:00 +0100
committerSiri Hansen <[email protected]>2019-03-06 12:10:26 +0100
commite03c2bd640e1fc1503e92dfd74991f4205973c61 (patch)
tree86dd52b45e65b7a1fae4b27947ae5bc632ebefb6 /lib/kernel/doc/src/logger_std_h.xml
parent0fb9b241d11588bdae29aa64ff96d1eb67d230af (diff)
downloadotp-e03c2bd640e1fc1503e92dfd74991f4205973c61.tar.gz
otp-e03c2bd640e1fc1503e92dfd74991f4205973c61.tar.bz2
otp-e03c2bd640e1fc1503e92dfd74991f4205973c61.zip
[logger] Add better control of file modes in logger_std_h
OTP-15602 It is allowed to set file modes for the handler to use when opening its log file. The given modes were earlier accepted without any checks, which could make the handler behave unexpectedly. This commit makes sure that * if none of write, append or exclusive is given, then append is added * if raw is not given, it is added * if delayed_write or {delayed_write,_,_} is not given, then delayed_write is added
Diffstat (limited to 'lib/kernel/doc/src/logger_std_h.xml')
-rw-r--r--lib/kernel/doc/src/logger_std_h.xml23
1 files changed, 15 insertions, 8 deletions
diff --git a/lib/kernel/doc/src/logger_std_h.xml b/lib/kernel/doc/src/logger_std_h.xml
index fcd180abd6..8c5a476d86 100644
--- a/lib/kernel/doc/src/logger_std_h.xml
+++ b/lib/kernel/doc/src/logger_std_h.xml
@@ -59,14 +59,21 @@
<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><c>LogFileOpts</c> specify the file options used when
+ opening the log file,
+ see <seealso marker="file#open-2"><c>file:open/2</c></seealso>.
+ If <c>LogFileOpts</c> is not specified, the default option
+ list used is <c>[raw,append,delayed_write]</c>. If <c>LogFileOpts</c>
+ is specified, it replaces the default options list with the
+ following adjustments:</p>
+ <list>
+ <item>
+ If <c>raw</c> is not found in the list, it is added
+ </item>
+ <item>
+ It <c>write</c>, <c>append</c> or <c>exclusice</c> are not
+ found in the list, <c>append</c> is added</item>
+ </list>
<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>