MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / Enabled

Method Enabled

logger/handler.go:93–105  ·  view source on GitHub ↗

Enabled checks if the given log level is enabled.

(ctx context.Context, level slog.Level)

Source from the content-addressed store, hash-verified

91
92// Enabled checks if the given log level is enabled.
93func (h *Handler) Enabled(ctx context.Context, level slog.Level) bool {
94 if level >= h.config.Level.Level() {
95 return true
96 }
97
98 for _, hook := range h.hooks {
99 if hook.Enabled(level) {
100 return true
101 }
102 }
103
104 return false
105}
106
107// WithAttrs returns a new handler with the given attributes added.
108func (h *Handler) WithAttrs(attrs []slog.Attr) slog.Handler {

Callers

nothing calls this directly

Calls 2

LevelMethod · 0.80
EnabledMethod · 0.65

Tested by

no test coverage detected