fix Incorrect Group Handling in RequestContextHandler logger.go (#4082)

Wrap the grouped handler in requestContextHandler to preserve context attribute injection.
fixes #4081

Signed-off-by: alihasan070707 <52155098+alihasan070707@users.noreply.github.com>
This commit is contained in:
alihasan070707
2025-05-13 08:51:25 +02:00
committed by GitHub
parent f7ead820a8
commit 230d1dc20a
+1 -1
View File
@@ -63,5 +63,5 @@ func (h requestContextHandler) WithAttrs(attrs []slog.Attr) slog.Handler {
}
func (h requestContextHandler) WithGroup(name string) slog.Handler {
return h.handler.WithGroup(name)
return requestContextHandler{h.handler.WithGroup(name)}
}