allow to set logLevel: error in config

This commit is contained in:
aler9 2021-10-28 17:29:27 +02:00
parent ab70f946b0
commit 9af006b488
2 changed files with 7 additions and 1 deletions

View File

@ -15,6 +15,9 @@ func (d LogLevel) MarshalJSON() ([]byte, error) {
var out string
switch d {
case LogLevel(logger.Error):
out = "error"
case LogLevel(logger.Warn):
out = "warn"
@ -36,6 +39,9 @@ func (d *LogLevel) UnmarshalJSON(b []byte) error {
}
switch in {
case "error":
*d = LogLevel(logger.Error)
case "warn":
*d = LogLevel(logger.Warn)

View File

@ -2,7 +2,7 @@
###############################################
# General parameters
# sets the verbosity of the program; available values are "warn", "info", "debug".
# sets the verbosity of the program; available values are "error", "warn", "info", "debug".
logLevel: info
# destinations of log messages; available values are "stdout", "file" and "syslog".
logDestinations: [stdout]