Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: update log (#8179)
Danny Xu3b975e851977
diff --git a/backend/api/v1/debug_interceptor.go b/backend/api/v1/debug_interceptor.goindex 9eac4d4415..dff81a65e4 100644--- a/backend/api/v1/debug_interceptor.go+++ b/backend/api/v1/debug_interceptor.go@@ -42,7 +42,7 @@ func NewDebugInterceptor(errorRecordRing *api.ErrorRecordRing, profile *config.Pfunc (in *DebugInterceptor) DebugInterceptor(ctx context.Context, request any, serverInfo *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (any, error) {startTime := time.Now()resp, err := handler(ctx, request)- in.debugInterceptorDo(ctx, request, serverInfo.FullMethod, err, startTime)+ in.debugInterceptorDo(ctx, serverInfo.FullMethod, err, startTime)return resp, err}@@ -52,12 +52,12 @@ func (in *DebugInterceptor) DebugStreamInterceptor(request any, ss grpc.ServerStstartTime := time.Now()err := handler(request, ss)ctx := ss.Context()- in.debugInterceptorDo(ctx, request, serverInfo.FullMethod, err, startTime)+ in.debugInterceptorDo(ctx, serverInfo.FullMethod, err, startTime)return err}-func (in *DebugInterceptor) debugInterceptorDo(ctx context.Context, request any, fullMethod string, err error, startTime time.Time) {+func (in *DebugInterceptor) debugInterceptorDo(ctx context.Context, fullMethod string, err error, startTime time.Time) {st := status.Convert(err)var logLevel slog.Levelvar logMsg string@@ -75,7 +75,7 @@ func (in *DebugInterceptor) debugInterceptorDo(ctx context.Context, request any,logLevel = slog.LevelErrorlogMsg = "unknown error"}- slog.Log(ctx, logLevel, logMsg, "method", fullMethod, "request", request, log.BBError(err), "latency", fmt.Sprintf("%vms", time.Since(startTime).Milliseconds()))+ slog.Log(ctx, logLevel, logMsg, "method", fullMethod, log.BBError(err), "latency", fmt.Sprintf("%vms", time.Since(startTime).Milliseconds()))if st.Code() == codes.Internal && slog.Default().Enabled(ctx, slog.LevelDebug) {var role api.Roleif r, ok := ctx.Value(common.RoleContextKey).(api.Role); ok {