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.
|
|
|
|
OTP-15146
|
|
|
|
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.
|
|
Specify which keys and associated values are allowed.
|
|
|
|
Conflicts:
lib/kernel/src/logger_disk_log_h.erl
|
|
|
|
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.
|
|
Module and Id are now always included as fields in Config, so these
are no longer returned as separate elements.
|
|
And add field 'module' in handler config.
|
|
Added:
* logger:get_config() - replaces i(), returns all Logger
configuration, i.e. primary and handler config, and module levels
* logger:get_handler_ids() -> [HandlerId]
* logger:get_handler_config() -> [{HandlerId,Module,Config}]
Removed:
* logger:i/1, will probably be replaced in a later release.
|
|
Function names changed:
get/set/update_logger_config -> get/set/update_primary_config
add/remove_logger_filter -> add/remove_primary_filter
|
|
The warning map was added to allow backwards compatiblity with
error_logger event handlers that were not prepared to receive warning
reports. error_logger still uses this internally, if legacy error
logger event handlers are installed. But Logger does not use it for
new Logger handlers.
|
|
New default for handlers is 'all'.
|
|
* Level can now be set/unset for multiple modules in one call.
* Added functions get_module_level/0 and get_module_level/1.
|
|
|
|
|
|
|
|
Also, change HandlerId from logger_simple to simple.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This field contains the index of all installed handlers. It is
internal and can not be altered by the user, and should therefore not
be visible.
|
|
These are replaced by new config handling and must not be used any
more.
|
|
Most logger configuration that was possible through
kernel application variables have been moved into a
common 'logger' application environment in kernel.
Now all the configuration possible through the logger
API can be done as sys config.
The handler started by kernel has been renamed to 'default'
instead of logger_std_h.
There is a new logger:setup_handlers/1 function that given an
application name can be used to setup handlers in other applications.
|
|
|
|
|
|
This env var lookup may fail during termination, when
application_controller process has terminated before logger.
|
|
|