From a2bd7643c40980897678047a178870632a2bf597 Mon Sep 17 00:00:00 2001 From: $MY_NAME Date: Mon, 10 Jul 2023 09:00:45 +0300 Subject: [PATCH] m --- log/log.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/log/log.go b/log/log.go index a43b11d1..25ce850e 100644 --- a/log/log.go +++ b/log/log.go @@ -183,7 +183,9 @@ func (h handler) Handle(ctx context.Context, r slog.Record) error { } return true }) - r.AddAttrs(newAttrs...) + if len(newAttrs) > 0 { + r.AddAttrs(newAttrs...) + } h.cBuf.mu.Lock() defer h.cBuf.mu.Unlock()