From f2852c86346ef46c45b6356d3cdd1a07dc405107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Wed, 24 Jul 2024 22:58:05 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4extra=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wrapper/gorm_v2.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wrapper/gorm_v2.go b/wrapper/gorm_v2.go index 72804e3..ec34f3b 100644 --- a/wrapper/gorm_v2.go +++ b/wrapper/gorm_v2.go @@ -178,7 +178,7 @@ func (g *Gorm) write(ctx context.Context, message string, level string, data map if nil == g.outCtx { g.outCtx = context.Background() } - for _, extraField := range g.extraCtxFieldList { + /*for _, extraField := range g.extraCtxFieldList { if len(extraField) == 0 { continue } @@ -189,7 +189,7 @@ func (g *Gorm) write(ctx context.Context, message string, level string, data map if val, exist := data[extraField]; !exist || nil == val { data[extraField] = val } - } + }*/ dataList := logger2.ZapLogDataList(logger2.NewLogData(g.outCtx, consts.LogTypeDatabase, "", data)) switch strings.ToUpper(level) {