MCPcopy
hub / github.com/redpanda-data/console / WithLevel

Function WithLevel

backend/pkg/logger/options.go:24–28  ·  view source on GitHub ↗

WithLevel sets the minimum log level using slog.Level directly. This provides type safety and avoids string parsing.

(level slog.Level)

Source from the content-addressed store, hash-verified

22// WithLevel sets the minimum log level using slog.Level directly.
23// This provides type safety and avoids string parsing.
24func WithLevel(level slog.Level) Option {
25 return func(c *config) {
26 c.level = level
27 }
28}
29
30// WithOutput sets the output writer for the logger.
31// Common use cases:

Callers 5

TestNewSlogLoggerFunction · 0.85
TestLoggerMethodsFunction · 0.85
TestWithLevelFunction · 0.85
FatalStartupFunction · 0.85
TestPrometheusHandlerFunction · 0.85

Calls

no outgoing calls

Tested by 4

TestNewSlogLoggerFunction · 0.68
TestLoggerMethodsFunction · 0.68
TestWithLevelFunction · 0.68
TestPrometheusHandlerFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…