Skip to content

Commit

Permalink
m
Browse files Browse the repository at this point in the history
  • Loading branch information
komuw committed Jul 10, 2023
1 parent cfa8ac6 commit a2bd764
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit a2bd764

Please sign in to comment.