From 9995b1c8ab3485cdae889e0c6f5cbdac5391eadb Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Tue, 14 Mar 2023 19:41:26 +0800 Subject: [PATCH] zap --- pkg/common/log/zap.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkg/common/log/zap.go b/pkg/common/log/zap.go index 09f610d5b..5fe5eefdd 100644 --- a/pkg/common/log/zap.go +++ b/pkg/common/log/zap.go @@ -55,11 +55,12 @@ type ZapLogger struct { func NewZapLogger() (*ZapLogger, error) { zapConfig := zap.Config{ - Level: zap.NewAtomicLevelAt(zapcore.DebugLevel), - Development: true, - Encoding: "json", - EncoderConfig: zap.NewProductionEncoderConfig(), - InitialFields: map[string]interface{}{"PID": os.Getegid()}, + Level: zap.NewAtomicLevelAt(zapcore.DebugLevel), + Development: true, + Encoding: "json", + EncoderConfig: zap.NewProductionEncoderConfig(), + DisableStacktrace: true, + InitialFields: map[string]interface{}{"PID": os.Getegid()}, } zl := &ZapLogger{} if config.Config.Log.Stderr {