Age | Commit message (Collapse) | Author |
|
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.
|
|
The encoding option was introduced in commit
270d909696a753af022df72a404c73f2895b4a02, to allow report callbacks to
format according to a given encoding. There was, however, no
connection between this encoding option, and the encoding of the
device to which the logger handler was writing.
Since a formatter is defined to return unicode:chardata(), and in
order to avoid mismatch with the encoding of the device, the encoding
option is now removed from the formatter. The handler itself must make
sure that it does not write illegal data to its device.
|
|
When printing a map with ~p in a log message, the formatter's
single_line option in some cases introduced unwanted commas after
'=>', for example:
This is now corrected. When single_line==true, width 0 is added to all
~p and ~P control sequences in the format string.
|
|
|
|
If the report callback is a fun of arity 2, then the second argument
is a map with the keys 'encoding', 'depth' and 'chars_limit', and the
fun must return a string which is size limited according to the given
depth and chars_limit.
If the report callback is a fun of arity 1, then it must return a
tuple containing a format string and a list of arguments. The
formatter will produce the string, and limit it's size.
|
|
|
|
|
|
Log events issued via error_logger:info_msg or
error_logger:info_report are now forwarded to Logger with level
'notice' instead of 'info'.
Log events issued by gen_* behaviours are also changed from level
'info' to level 'notice'.
Progress reports are still 'info', and can therefore easily be
included/excluded by changing the primary log level. By default, they
are not logged.
|
|
* Nested metadata keys are now expressed as list of atoms (was earlier tuples).
* If-exist is expressed as:
{Key,IfExist,Else}
Key :: atom() | [atom()]
IfExist :: template()
Else :: template()
|
|
|
|
|
|
Earlier, only reports and {Format,Args} was limited by chars_limit,
and max_size was needed to limit the size of a string.
|
|
|
|
|
|
|
|
These are replaced by new config handling and must not be used any
more.
|
|
This used to be string() is now changed to unicode:chardata().
|
|
|
|
|
|
|