Set a default severity for loggers

So far, the documentation has claimed that loggers have a default severity
(information for FileLogger and warning for SyslogLogger). However, this was
not the case and not setting the severity resulted in a configuration error.

This commit changes the default value to be information for all loggers.
This commit is contained in:
Julian Brost 2021-06-23 16:48:48 +02:00
parent 2cd9c1d902
commit 963ad9dd1c
2 changed files with 4 additions and 2 deletions

View File

@ -1835,7 +1835,7 @@ Configuration Attributes:
Name | Type | Description
--------------------------|-----------------------|----------------------------------
severity | String | **Optional.** The minimum severity for this log. Can be "debug", "notice", "information", "warning" or "critical". Defaults to "warning".
severity | String | **Optional.** The minimum severity for this log. Can be "debug", "notice", "information", "warning" or "critical". Defaults to "information".
facility | String | **Optional.** Defines the facility to use for syslog entries. This can be a facility constant like `FacilityDaemon`. Defaults to `FacilityUser`.
Facility Constants:

View File

@ -9,7 +9,9 @@ namespace icinga
abstract class Logger : ConfigObject
{
[config] String severity;
[config] String severity {
default {{{ return "information"; }}}
};
};
}