You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you do "WithValues" multiple times for the same field, zapr will adds the field multiple times to the record.
I'm not sure that's what we want; we probably want to override the field with the latest value.
One way to deal with this would be to change how we pass "logr" along in contexts. Rather than passing along a logr with any values attached to it in context we could define a new interface
type LogR struct {
log *LogR
fields map[string]interface{}
}
We could then store the fields in map. We could override "WithValues" so that each time it gets called we reconstruct the logr.
The text was updated successfully, but these errors were encountered:
See: go-logr/logr#170
If you do "WithValues" multiple times for the same field, zapr will adds the field multiple times to the record.
I'm not sure that's what we want; we probably want to override the field with the latest value.
One way to deal with this would be to change how we pass "logr" along in contexts. Rather than passing along a logr with any values attached to it in context we could define a new interface
We could then store the fields in map. We could override "WithValues" so that each time it gets called we reconstruct the logr.
The text was updated successfully, but these errors were encountered: