diff options
Diffstat (limited to 'plugins/logger/config.go')
-rw-r--r-- | plugins/logger/config.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/plugins/logger/config.go b/plugins/logger/config.go index bf7343c7..52594bc4 100644 --- a/plugins/logger/config.go +++ b/plugins/logger/config.go @@ -88,7 +88,17 @@ func (cfg *Config) BuildLogger() (*zap.Logger, error) { zCfg.ErrorOutputPaths = cfg.ErrorOutput } - // todo: https://github.com/uber-go/zap/blob/master/FAQ.md#does-zap-support-log-rotation + // todo: return zCfg.Build() } + +// Initialize default logger +func (cfg *Config) InitDefault() { + if cfg.Mode == "" { + cfg.Mode = "development" + } + if cfg.Level == "" { + cfg.Level = "debug" + } +} |