summaryrefslogtreecommitdiff
path: root/plugins/logger
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-01-15 00:29:23 +0300
committerValery Piashchynski <[email protected]>2021-01-15 00:29:23 +0300
commitaff4d2c7a92ae014988b27b27069b15a971b6c36 (patch)
tree50dc6e22db7ff51b0fcf3cce0a45b7b739e1f300 /plugins/logger
parent7542ae2d4c392290766405d31996378378aad975 (diff)
Viper doesn't support `yaml` structure tags, it uses mapstructure
instead
Diffstat (limited to 'plugins/logger')
-rw-r--r--plugins/logger/config.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/logger/config.go b/plugins/logger/config.go
index f7a5742c..8cc88d02 100644
--- a/plugins/logger/config.go
+++ b/plugins/logger/config.go
@@ -10,26 +10,26 @@ import (
// ChannelConfig configures loggers per channel.
type ChannelConfig struct {
// Dedicated channels per logger. By default logger allocated via named logger.
- Channels map[string]Config `json:"channels" yaml:"channels"`
+ Channels map[string]Config `json:"channels" mapstructure:"channels"`
}
type Config struct {
// Mode configures logger based on some default template (development, production, off).
- Mode string `json:"mode" yaml:"mode"`
+ Mode string `json:"mode" mapstructure:"mode"`
// Level is the minimum enabled logging level. Note that this is a dynamic
// level, so calling ChannelConfig.Level.SetLevel will atomically change the log
// level of all loggers descended from this config.
- Level string `json:"level" yaml:"level"`
+ Level string `json:"level" mapstructure:"level"`
// Encoding sets the logger's encoding. Valid values are "json" and
// "console", as well as any third-party encodings registered via
// RegisterEncoder.
- Encoding string `json:"encoding" yaml:"encoding"`
+ Encoding string `json:"encoding" mapstructure:"encoding"`
// Output is a list of URLs or file paths to write logging output to.
// See Open for details.
- Output []string `json:"output" yaml:"output"`
+ Output []string `json:"output" mapstructure:"output"`
// ErrorOutput is a list of URLs to write internal logger errors to.
// The default is standard error.
@@ -37,7 +37,7 @@ type Config struct {
// Note that this setting only affects internal errors; for sample code that
// sends error-level logs to a different location from info- and debug-level
// logs, see the package-level AdvancedConfiguration example.
- ErrorOutput []string `json:"errorOutput" yaml:"errorOutput"`
+ ErrorOutput []string `json:"errorOutput" mapstructure:"errorOutput"`
}
// ZapConfig converts config into Zap configuration.