Fix log level bugs.

This commit is contained in:
Jay
2026-04-23 19:24:40 -04:00
parent 3f0d95955c
commit 230e6e608a
4 changed files with 12 additions and 7 deletions
+2 -2
View File
@@ -96,11 +96,11 @@ func (h *ForcedLevelHandler) Handle(ctx context.Context, r slog.Record) error {
}
func (h *ForcedLevelHandler) WithAttrs(attrs []slog.Attr) slog.Handler {
return &ForcedLevelHandler{next: h.next.WithAttrs(attrs)}
return &ForcedLevelHandler{level: h.level, next: h.next.WithAttrs(attrs)}
}
func (h *ForcedLevelHandler) WithGroup(name string) slog.Handler {
return &ForcedLevelHandler{next: h.next.WithGroup(name)}
return &ForcedLevelHandler{level: h.level, next: h.next.WithGroup(name)}
}
func WrapOrDefault(level *slog.Level, handler slog.Handler) slog.Handler {