WithLevel sets the minimum log level using slog.Level directly. This provides type safety and avoids string parsing.
(level slog.Level)
| 22 | // WithLevel sets the minimum log level using slog.Level directly. |
| 23 | // This provides type safety and avoids string parsing. |
| 24 | func 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: |
no outgoing calls
searching dependent graphs…