Is there any way in which I can hide logging sensitive fields while using ubergo zap.
Will appreciate if somebody can show an example
Is there any way in which I can hide logging sensitive fields while using ubergo zap.
Will appreciate if somebody can show an example
You can make those fields custom type and implement Stringer interface for them printing
****. For example:will print
msg {"x": "***"}.Or you can implement your own version of
Encoderwhere you would filter fields by name or their typeInterfaceinEncodeEntry(ent Entry, fields []Field)function. You can take one of the two existing encoders - console or json - as a base. For example:This will print