allow to set logLevel: error in config
This commit is contained in:
parent
ab70f946b0
commit
9af006b488
|
@ -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)
|
||||
|
||||
|
|
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue