Skip to content

Commit 2db67b8

Browse files
committed
filter out notify attr from notification message
1 parent ccdcebd commit 2db67b8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/logging/notify_handler.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ func recordToStruct(r slog.Record) Notification {
6565
attrs := make(map[string]any, r.NumAttrs())
6666

6767
r.Attrs(func(a slog.Attr) bool {
68-
attrs[a.Key] = a.Value.Any()
68+
// filter out notify control key
69+
if a.Key != "notify" {
70+
attrs[a.Key] = a.Value.Any()
71+
}
6972
return true
7073
})
7174

0 commit comments

Comments
 (0)