Skip to content

Commit

Permalink
bazel tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
miampf committed Jan 29, 2024
1 parent c7641e7 commit f062829
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cli/internal/cmd/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions internal/logger/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
})
}
Expand Down

0 comments on commit f062829

Please sign in to comment.