Skip to content

Commit

Permalink
Merge branch 'sbruens/logger' into sbruens/caddy
Browse files Browse the repository at this point in the history
  • Loading branch information
sbruens committed Sep 23, 2024
2 parents a5a2e4a + 12a0c90 commit 4c7f6fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion service/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ package service
import (
"io"
"log/slog"
"math"
)

func noopLogger() *slog.Logger {
return slog.New(slog.NewTextHandler(io.Discard, &slog.HandlerOptions{Level: slog.LevelError}))
// TODO: Use built-in no-op log level when available: https://go.dev/issue/62005
return slog.New(slog.NewTextHandler(io.Discard, &slog.HandlerOptions{Level: slog.Level(math.MaxInt)}))
}

0 comments on commit 4c7f6fd

Please sign in to comment.