From 270d909696a753af022df72a404c73f2895b4a02 Mon Sep 17 00:00:00 2001
From: Siri Hansen
A fun which converts a
The report callback must be a fun with one or two + arguments. If it takes one argument, this is the report + itself, and the fun returns a format string and arguments:
+fun((+) -> { logger:report() ,[term()]}) io:format()
If it takes two arguments, the first is the report, and the + second is a map containing extra data that allows direct + coversion to a string:
+fun((+, logger:report() ) -> logger:report_cb_config() ) + unicode:chardata()
The fun must obey the
Example, format string and arguments:
logger:error("The file does not exist: ~ts",[Filename])
Example, string:
diff --git a/lib/kernel/doc/src/logger_formatter.xml b/lib/kernel/doc/src/logger_formatter.xml index a482d02293..9226d19834 100644 --- a/lib/kernel/doc/src/logger_formatter.xml +++ b/lib/kernel/doc/src/logger_formatter.xml @@ -82,6 +82,13 @@ in STDLIB.Defaults to
This parameter must reflect the encoding of the device + that the handler prints to.
+Defaults to
If set to
Defaults to
A report callback is used by the formatter to transform log messages on report form to a format string and @@ -119,9 +127,6 @@ both the default report callback, and any report callback found in metadata. That is, all reports are converted by this configured function.
-The value must be a function with arity 1,
- returning