mirror of
https://codeberg.org/scip/yadu.git
synced 2025-12-16 20:21:00 +01:00
fix #6: support LogValuer() attributes
This commit is contained in:
@@ -75,7 +75,11 @@ func (h *Handler) Handle(ctx context.Context, r slog.Record) error {
|
||||
|
||||
fields := make(map[string]interface{}, r.NumAttrs())
|
||||
r.Attrs(func(a slog.Attr) bool {
|
||||
fields[a.Key] = a.Value.Any()
|
||||
//fields[a.Key] = a.Value.Any()
|
||||
a.Value = a.Value.Resolve()
|
||||
wa := make(map[string]interface{})
|
||||
h.appendAttr(wa, a)
|
||||
fields[a.Key] = wa[a.Key]
|
||||
return true
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user