diff --git a/cli/internal/cmd/apply.go b/cli/internal/cmd/apply.go index d13402b02e1..70d66daa67c 100644 --- a/cli/internal/cmd/apply.go +++ b/cli/internal/cmd/apply.go @@ -812,7 +812,7 @@ func (wl warnLogger) Info(msg string, args ...any) { // Warn prints a formatted warning from the validator. func (wl warnLogger) Warn(msg string, args ...any) { - wl.cmd.PrintErrf("Warning: %s %s\n", msg, fmt.Sprint(args...)) + wl.cmd.PrintErrf("Warning: %s %s\n", msg, fmt.Sprint(args...)) } type warnLog interface { diff --git a/internal/logger/log.go b/internal/logger/log.go index ffabfd9c4cf..ad89aced688 100644 --- a/internal/logger/log.go +++ b/internal/logger/log.go @@ -69,7 +69,7 @@ func GetClientStreamInterceptor(l *slog.Logger) grpc.DialOption { func middlewareLogger(l *slog.Logger) logging.Logger { return logging.LoggerFunc(func(ctx context.Context, lvl logging.Level, msg string, fields ...any) { - var pcs [1]uintptr + var pcs [1]uintptr runtime.Callers(2, pcs[:]) // skip [Callers, LoggerFunc] level := slog.LevelDebug @@ -83,11 +83,11 @@ func middlewareLogger(l *slog.Logger) logging.Logger { case logging.LevelError: level = slog.LevelError default: - level = slog.LevelError + level = slog.LevelError } r := slog.NewRecord(time.Now(), level, msg, pcs[0]) - r.Add(fields...) + r.Add(fields...) _ = l.Handler().Handle(context.Background(), r) }) }