From aa9a815a2adb64593285bb0e94603ba7086c15f6 Mon Sep 17 00:00:00 2001 From: Wang Yunxiao Date: Thu, 26 Sep 2024 17:26:01 +0800 Subject: [PATCH] =?UTF-8?q?=E9=94=99=E8=AF=AF=E6=8B=A6=E6=88=AA=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=85=A8=E5=B1=80=20glog=20=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- interceptor/v1/grpc/interceptor.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/interceptor/v1/grpc/interceptor.go b/interceptor/v1/grpc/interceptor.go index 6e2074e..e43fd79 100644 --- a/interceptor/v1/grpc/interceptor.go +++ b/interceptor/v1/grpc/interceptor.go @@ -2,9 +2,10 @@ package grpc import ( "context" + "gitea.drugeyes.vip/pharnexbase/utils/enum" + "gitea.drugeyes.vip/pharnexbase/utils/glog/v1" "github.com/go-kratos/kratos/v2/errors" - "github.com/go-kratos/kratos/v2/log" "google.golang.org/grpc" ) @@ -50,7 +51,7 @@ func (i *Interceptor) UnaryServerInterceptor() grpc.UnaryServerInterceptor { } // 正式服,统一返回“服务错误” err = ErrInternalServer - log.Errorf("InterServerErr:%v", se) + glog.Glog.WithContext(ctx).Errorf("InnServerErr: %v", se) } return }