diff --git a/logger/wrappedslogger.go b/logger/wrappedslogger.go index 4130b14..1500543 100644 --- a/logger/wrappedslogger.go +++ b/logger/wrappedslogger.go @@ -89,9 +89,13 @@ func (wl *WrappedSlogger) Trace(msg string, fields watermill.LogFields) { func (wl *WrappedSlogger) With(fields watermill.LogFields) watermill.LoggerAdapter { attrs := LogFieldsToSlogAttrs(fields) + loggerArgs := make([]any, len(attrs)) + for idx, attr := range attrs { + loggerArgs[idx] = attr + } newLoggers := make([]*slog.Logger, 0) for _, l := range wl.loggers { - newLoggers = append(newLoggers, l.With(attrs)) + newLoggers = append(newLoggers, l.With(loggerArgs...)) } return &WrappedSlogger{loggers: newLoggers}