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.
See: https://github.com/go-logr/logr/issues/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.