samber / slog-syslog

🚨 slog: Syslog handler
https://pkg.go.dev/github.com/samber/slog-syslog/v2
MIT License
13 stars 4 forks source link

WithGroup methos returns new handler instead of receiver #4

Closed katevi closed 4 months ago

katevi commented 4 months ago

Hi! It looks like syslog handler always returns new handler even when name is empty: https://github.com/samber/slog-syslog/blob/main/handler.go#L103 .

Though golang docs https://pkg.go.dev/log/slog#Handler says:

// If the name is empty, WithGroup returns the receiver.

is it ok?

samber commented 4 months ago

I agree. Could you please suggest a fix ?

katevi commented 4 months ago

ok I'll do that =)