diff options
author | bricelalu <[email protected]> | 2021-03-31 11:34:14 +0200 |
---|---|---|
committer | bricelalu <[email protected]> | 2021-03-31 12:03:43 +0200 |
commit | 2feb852ce0a5d29f9ad9c5cb5329de3ce00e7955 (patch) | |
tree | 655af0406a0a8dead81aeac0e6818080317884b2 /plugins/logger | |
parent | ae6d488c9da200203c78af23518ea4f2f2e96773 (diff) |
feat: [Logger] add clean mode
Diffstat (limited to 'plugins/logger')
-rw-r--r-- | plugins/logger/config.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/logger/config.go b/plugins/logger/config.go index 52594bc4..284ab6ea 100644 --- a/plugins/logger/config.go +++ b/plugins/logger/config.go @@ -50,6 +50,16 @@ func (cfg *Config) BuildLogger() (*zap.Logger, error) { zCfg = zap.NewProductionConfig() case "development": zCfg = zap.NewDevelopmentConfig() + case "clean": + zCfg = zap.Config{ + Level: zap.NewAtomicLevelAt(zap.DebugLevel), + Encoding: "console", + EncoderConfig: zapcore.EncoderConfig{ + MessageKey: "message", + }, + OutputPaths: []string{"stderr"}, + ErrorOutputPaths: []string{"stderr"}, + } default: zCfg = zap.Config{ Level: zap.NewAtomicLevelAt(zap.DebugLevel), |