aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/doc/src/logger_chapter.xml
AgeCommit message (Collapse)Author
2019-03-08[logger] Add log file rotation by options to logger_std_hSiri Hansen
OTP-15479 OTP-15662 New configuration map for logger_std_h: #{type => file, file => file:filename(), modes => [file:mode()], max_no_bytes => pos_integer() | infinity, max_no_files => non_neg_integer(), compress_on_rotate => boolean()} For backwards compatibility, the old variant for specifying the file name via the 'type' parameter is still supported, i.e. {file,FileName} and {file,FileName,Modes}, but it is no longer documented. Rotation scheme: The current log file always has the same name, and the archived files get extensions ".0", ".1", ... The newest archive has extension ".0", and the oldest archive has the highest number. If 'compress_on_rotate' is set to true, the archived files are gzipped and get the additional extension ".gz", e.g. error.log.0.gz. Rotation is turned off by setting 'max_no_bytes' to infinity. Setting 'max_no_files' to 0 does not turn off rotation, but only specifies that no archives are to be saved.
2019-01-16[logger] Add API function for configuring logger proxySiri Hansen
2018-11-27[logger] Document that macros are defined in logger.hrlSiri Hansen
2018-10-03[logger] Add handler callback filter_config/1Siri Hansen
This function is called when a logger API function for fetching handler configuration is called. The point is to allow the handler to remove internal data fields that it might have stored in the configuration database, before returning the handler configuration to the caller. An example of such internal data are the 'handler_pid' and 'mode_tab' fields that logger_std_h and logger_disk_log_h store in their configuration maps.
2018-10-03[logger] Add update_handler_config/3Siri Hansen
This function is similar to set_handler_config/3, but calls the handler callback changing_config/3 with the first parameter SetOrUpdate=update.
2018-09-20[logger] Add SetOrUpdate parameter to handler callback changing_configSiri Hansen
Since logger has now knowledge of the handler specific data ('config' field in the handler configuration map), it can not merge this data structure with default or old values upon configuration change. Instead, the handler callback changing_config must do this. Earlier, this callback did not reflect if the configuration change was initiated by a call to set_handler_config or update_handler_config, so the handler did not know if unspecified fields should get default values or the values from the existing configuration. To overcome this problem, the new parameter SetOrUpdate is added to this callback. If SetOrUpdate equals set, then default values should be used. If SetOrUpdate equals update, then existing configuration values should be used.
2018-09-12[logger] Include single_line option to report_cbSiri Hansen
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.
2018-09-12[logger] Remove encoding option from logger_formatterSiri Hansen
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.
2018-08-17Fix kernel_app doc logger_level default from info to noticetarabit190
The doc says the default kernel logger_level is info, it should be notice. Please refer to commit 0d52b992c30eff8604e5a5363510fea38c712263 for more info.
2018-07-14Fix typo in logger docssunboshan
2018-07-13[logger] Allow report callback with two arguments returning a stringSiri Hansen
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.
2018-07-13[logger] Generate .png file from .diaSiri Hansen
2018-06-18Update copyright yearHenrik Nord
2018-06-15Merge branch 'siri/logger-fix'Siri Hansen
* siri/logger-fix: [logger] Update documentation [logger] Adjust priority settings in test [logger] Unregister handler names before terminating [logger] Stress overload_kill tests in disk_log handler
2018-06-15[logger] Update documentationSiri Hansen
2018-06-14[logger] Correct documentationPeter Andersson
2018-06-14[logger] Update handler documentationPeter Andersson
2018-06-11[logger] Update documentationSiri Hansen
2018-05-23Update documentation of logger and error_loggerSiri Hansen
2018-05-23Change type name logger:log() to logger:log_event()Siri Hansen
2018-05-23Change env var logger_log_progress to logger_progress_reportsSiri Hansen
2018-05-23Remove HandlerId from handler callback functions and add it to ConfigSiri Hansen
2018-05-23Change handler id for sasl handler from sasl_h to saslSiri Hansen
2018-05-23Change Compare parameter to logger_filters:domain/2Siri Hansen
This configuration option has been removed. logger_formatter will read the utc_log configuration parameter and format the timestamp accordingly.
2018-05-23Update Logger documentationSiri Hansen
2018-05-23Add logger:update_formatter_config/2,3Siri Hansen
2018-05-23Improve documentation of logger and error_loggerSiri Hansen
2018-05-21Fix some link errors in logger documentationSiri Hansen
2018-05-21logger: Rework configuration of loggerLukas Larsson
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.
2018-05-21Merge remote-tracking branch 'peppe/peppe/kernel/logger_handler_fixes'Siri Hansen
* peppe/peppe/kernel/logger_handler_fixes: Various logger handler improvements and updated test cases Make it possible to disable sync and drop mode Conflicts: lib/kernel/test/logger_disk_log_h_SUITE.erl lib/kernel/test/logger_std_h_SUITE.erl
2018-05-07Change logger callback removing_handler/1 to removing_handler/2Siri Hansen
2018-05-07Change return type from logger_formatter:format/2Siri Hansen
This used to be string() is now changed to unicode:chardata().
2018-05-04Various logger handler improvements and updated test casesPeter Andersson
2018-05-03Make it possible to disable sync and drop modePeter Andersson
Also add tests and update failing test cases
2018-05-03Update logger documentationSiri Hansen
2018-05-02kernel: Use formatter in simple logger exampleLukas Larsson
2018-04-26Add documentation of the built-in logger handlersPeter Andersson
2018-04-26Add loggerSiri Hansen