aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/doc/src
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2018-09-12 14:37:02 +0200
committerSiri Hansen <[email protected]>2018-09-12 14:58:02 +0200
commita4ff9f378ae7008e268d1c2facd44d049be6e930 (patch)
tree8720a85fd958a7fe4670f2ff0b52f246fd719235 /lib/kernel/doc/src
parent7140fe7679c1ea0862961d2fc34f9d8283c04ca3 (diff)
downloadotp-a4ff9f378ae7008e268d1c2facd44d049be6e930.tar.gz
otp-a4ff9f378ae7008e268d1c2facd44d049be6e930.tar.bz2
otp-a4ff9f378ae7008e268d1c2facd44d049be6e930.zip
[logger] Include single_line option to report_cb
If the report callback function has two arguments, the second argument is a map with options to limit the size of the log event. To even allow a better formatting when the event shall be printed on a single line, the new option single_line is now included in this argument.
Diffstat (limited to 'lib/kernel/doc/src')
-rw-r--r--lib/kernel/doc/src/logger_chapter.xml11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/kernel/doc/src/logger_chapter.xml b/lib/kernel/doc/src/logger_chapter.xml
index 26066d0777..4a81cfa34a 100644
--- a/lib/kernel/doc/src/logger_chapter.xml
+++ b/lib/kernel/doc/src/logger_chapter.xml
@@ -209,10 +209,13 @@
<pre>fun((<seealso marker="logger#type-report"><c>logger:report()</c></seealso>,<seealso marker="logger#type-report_cb_config"><c>logger:report_cb_config()</c></seealso>) -> <seealso marker="stdlib:unicode#type-chardata"><c>unicode:chardata()</c></seealso>)
</pre>
<p>The fun must obey the <c>depth</c> and <c>chars_limit</c>
- parameters provided in the second argument, as the formatter
- can not do anything useful of these parameters with the
- returned string. This variant is used when the formatting of
- the report depends on the size parameters.</p>
+ parameters provided in the second argument, as the formatter can
+ not do anything useful of these parameters with the returned
+ string. The extra data also contains a field named
+ <c>single_line</c>, indicating if the printed log message may
+ contain line breaks or not. This variant is used when the
+ formatting of the report depends on the size or single line
+ parameters.</p>
<p>Example, format string and arguments:</p>
<code>logger:error("The file does not exist: ~ts",[Filename])</code>
<p>Example, string:</p>