summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbricelalu <[email protected]>2021-03-31 11:34:14 +0200
committerbricelalu <[email protected]>2021-03-31 12:03:43 +0200
commit2feb852ce0a5d29f9ad9c5cb5329de3ce00e7955 (patch)
tree655af0406a0a8dead81aeac0e6818080317884b2
parentae6d488c9da200203c78af23518ea4f2f2e96773 (diff)
feat: [Logger] add clean mode
-rw-r--r--CHANGELOG.md1
-rw-r--r--plugins/logger/config.go10
2 files changed, 11 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 82086de1..c1a171e5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,7 @@ v2.0.3 (-.-.2021)
-------------------
- 🐛 Fix: slow last response when reached `max_jobs` limit.
+- 📜 Add a new `clean` mode for the `logger` plugin to keep the stderr log message of the worker unmodified.
v2.0.2 (06.04.2021)
-------------------
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),