From 653fce11da87becd8959ad5bdc33f20a15b1effb Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Thu, 12 Jan 2023 17:08:10 +0800 Subject: [PATCH] log --- pkg/common/log/logrus.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/common/log/logrus.go b/pkg/common/log/logrus.go index b6d016142..c92e0655e 100644 --- a/pkg/common/log/logrus.go +++ b/pkg/common/log/logrus.go @@ -256,7 +256,7 @@ func ShowLog(ctx context.Context) { for _, v := range *t.Funcs { if v.Err != nil { ctxLogger.WithFields(logrus.Fields{ - "Type": ctxLogger.Type, + "Type": v.File, "OperationID": OperationID, "PID": ctxLogger.Pid, "FilePath": v.File, @@ -265,21 +265,21 @@ func ShowLog(ctx context.Context) { switch v.LogLevel { case logrus.InfoLevel: ctxLogger.WithFields(logrus.Fields{ - "Type": ctxLogger.Type, + "Type": v.File, "OperationID": OperationID, "PID": ctxLogger.Pid, "FilePath": v.File, }).Infoln("func: ", v.FuncName, " args: ", v.Args) case logrus.DebugLevel: ctxLogger.WithFields(logrus.Fields{ - "Type": ctxLogger.Type, + "Type": v.File, "OperationID": OperationID, "PID": ctxLogger.Pid, "FilePath": v.File, }).Debugln("func: ", v.FuncName, " args: ", v.Args) case logrus.WarnLevel: ctxLogger.WithFields(logrus.Fields{ - "Type": ctxLogger.Type, + "Type": v.File, "OperationID": OperationID, "PID": ctxLogger.Pid, "FilePath": v.File,