diff --git a/handler.go b/handler.go index cb9d7a6..7652027 100644 --- a/handler.go +++ b/handler.go @@ -86,6 +86,11 @@ func (h *NATSHandler) WithAttrs(attrs []slog.Attr) slog.Handler { } func (h *NATSHandler) WithGroup(name string) slog.Handler { + // https://cs.opensource.google/go/x/exp/+/46b07846:slog/handler.go;l=247 + if name == "" { + return h + } + return &NATSHandler{ option: h.option, attrs: h.attrs,