generated from pkg/go-template
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"git.icechen.cn/monorepo/backend/pkg/env"
|
||||
_ "git.icechen.cn/monorepo/backend/pkg/orm"
|
||||
"github.com/gofiber/fiber/v2"
|
||||
ctxLogger "github.com/luizsuper/ctxLoggers"
|
||||
"go.uber.org/zap"
|
||||
@@ -31,7 +32,7 @@ func Interceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInf
|
||||
if err != nil {
|
||||
ctxLogger.Debug(ctx, serverName, zap.String("gRPC method", fmt.Sprintf(" %s", info.FullMethod)), zap.Float64("cost_time", costSeconds), zap.String("errorReason", err.Error()))
|
||||
} else {
|
||||
ctxLogger.Debug(ctx, serverName, zap.String("gRPC method", fmt.Sprintf(" %s, %v", info.FullMethod, resp)), zap.Float64("cost_time", costSeconds), zap.Any("resp", resp))
|
||||
//ctxLogger.Debug(ctx, serverName, zap.String("gRPC method", fmt.Sprintf(" %s, %v", info.FullMethod, resp)), zap.Float64("cost_time", costSeconds), zap.Any("resp", resp))
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user