From 026d5105080187a61159cdc1441366c0aac6e019 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 6 Jan 2025 00:04:03 +0100 Subject: [PATCH] fix log config --- pkg/extconfig/log.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/extconfig/log.go b/pkg/extconfig/log.go index 7592550c..03af9f37 100644 --- a/pkg/extconfig/log.go +++ b/pkg/extconfig/log.go @@ -28,7 +28,7 @@ func (e *ExtConfig) BuildLogger() *zap.Logger { func (e *ExtConfig) BuildLoggerWithLevel(l zapcore.Level) *zap.Logger { config := zap.Config{ Encoding: "json", - Development: false, + Development: e.Debug, OutputPaths: []string{"stdout"}, ErrorOutputPaths: []string{"stderr"}, EncoderConfig: zap.NewProductionEncoderConfig(), @@ -36,7 +36,6 @@ func (e *ExtConfig) BuildLoggerWithLevel(l zapcore.Level) *zap.Logger { config.Level = zap.NewAtomicLevelAt(l) config.DisableCaller = !e.Debug if e.Debug { - config.Development = false config.Encoding = "console" config.EncoderConfig = zap.NewDevelopmentEncoderConfig() config.EncoderConfig.EncodeLevel = zapcore.CapitalColorLevelEncoder