feat : script service
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-01-23 14:48:44 +08:00
parent ab78141e7d
commit b3c49eaa34
17 changed files with 485 additions and 84 deletions
+2 -1
View File
@@ -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
}