aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test/logger_SUITE.erl
AgeCommit message (Collapse)Author
2019-03-08Merge branch 'siri/logger/file-logging-improvements' into maintSiri Hansen
* siri/logger/file-logging-improvements: [logger] Add option file_check to logger_std_h [logger] Add log file rotation by options to logger_std_h [logger] Add better control of file modes in logger_std_h [logger] Refactor logger_std_h [logger] Make sure log file is re-opened with configured file options
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-03-06[logger] Add better control of file modes in logger_std_hSiri Hansen
OTP-15602 It is allowed to set file modes for the handler to use when opening its log file. The given modes were earlier accepted without any checks, which could make the handler behave unexpectedly. This commit makes sure that * if none of write, append or exclusive is given, then append is added * if raw is not given, it is added * if delayed_write or {delayed_write,_,_} is not given, then delayed_write is added
2019-02-22[logger] Change timestamp from erlang:system_time to os:system_timeSiri Hansen
This is to align the timestamps with external logs.
2019-02-19[logger] Add pretty print function for configurationSiri Hansen
2018-10-03[logger] Start using handler callback changing_config/3 in built-in handlersSiri Hansen
The new parameter to this function, SetOrUpdate, indicates how unspecified configuration data fields shall be set. The rule is that if SetOrUpdate equals set, then default values shall be used, and if SetOrUpdate equals update, then existing configuration values shall be used. Consequently, these examples now apply to logger_std_h and logger_disk_log_h: set_handler_config(default, config, #{sync_mode_qlen => 20}) sets the value of sync_mode_qlen to 20, and resets all other (writable) fields in the config map to their default values. update_handler_config(default, config, #{sync_mode_qlen => 20}) sets the value of sync_mode_qlen to 20, and leaves all other fields in the config map unchanged.
2018-09-18Merge branch 'siri/cuddle' into maintSiri Hansen
* siri/cuddle: [logger] Skip app level test if app cannot be loaded Terminate nodes after failed test cases in erl_distribution_SUITE Skip performance test on build types other than 'opt'
2018-09-17[logger] Skip app level test if app cannot be loadedSiri Hansen
2018-09-12[logger] Improve code coverage in testSiri Hansen
2018-09-12[logger] Refactor, and add error detection for configurationSiri Hansen
2018-09-12[logger] Refactor some logger internalsSiri Hansen
2018-07-16kernel: Add logger:set_application_level/2Lukas Larsson
OTP-15146
2018-07-13[logger] Remove compiler warnings in testSiri Hansen
2018-07-13[logger] Add ?LOG macro which takes Level as argumentSiri Hansen
2018-06-12[logger] Reset logger config after testsSiri Hansen
2018-06-11[logger] Change default primary log level to 'notice'Siri Hansen
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.
2018-06-08[logger] Update return values from get_handler_config/0,1 and get_config/0Siri Hansen
Module and Id are now always included as fields in Config, so these are no longer returned as separate elements.
2018-06-08[logger] Change name of handler specific config field from ?MODULE to 'config'Siri Hansen
And add field 'module' in handler config.
2018-06-08[logger] Add more functions for reading configurationSiri Hansen
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.
2018-06-08[logger] Change concept of 'global' configuration to 'primary' configurationSiri Hansen
Function names changed: get/set/update_logger_config -> get/set/update_primary_config add/remove_logger_filter -> add/remove_primary_filter
2018-06-08[logger] Add if-exist functionality for metadata keys in formatter templateSiri Hansen
* 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()
2018-06-08[logger] Add configurable log levels 'all' and 'none'Siri Hansen
New default for handlers is 'all'.
2018-06-08[logger] Update interface for setting/unsetting module levelSiri Hansen
* Level can now be set/unset for multiple modules in one call. * Added functions get_module_level/0 and get_module_level/1.
2018-06-08[logger] Change handler config to accept all levels by defaultSiri Hansen
2018-05-23Remove HandlerId from handler callback functions and add it to ConfigSiri Hansen
2018-05-23Rename reset_module_level to unset_module_levelSiri Hansen
2018-05-23Use system_time instead of monotonic_time as timestamp in loggerSiri Hansen
2018-05-21Format logger timestamps according to RFC3339Siri Hansen
2018-05-21Add update_logger_config/1 and update_handler_config/2 to loggerSiri Hansen
2018-05-21Hide handlers field in logger config map from the APISiri Hansen
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.
2018-05-21Improve santiy check of formatter configSiri Hansen
2018-05-21kernel: Make all handler callbacks not block loggerLukas Larsson
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-07Change logger callback removing_handler/1 to removing_handler/2Siri Hansen
2018-05-07Add logger:update_process_metadata/1Siri Hansen
2018-04-26Add loggerSiri Hansen