-
-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
I am banging my head in this seemingly easy and as I think not unreasonable issue.
-
I would like to create a new slog handler which adds a field eventID with an outomatically added UUID
Achieved, writing custom handler type an custom Handler which adds a new field. Alternatively some trickery with ReplaceAttr also get's me there, Handler is cleaner though.
-
I would like to add further logging attributes into a group "custom", therefore I call myslogderivedlogger.WithGroup("custom").
Here it get's funny though, as the field eventid is now added as custom.eventID instead at the "root" level, at the root level there is no more eventId
Would your slog middleware help me in getting there?
Metadata
Metadata
Assignees
Labels
No labels