Recommended patterns for consistent field key names #1354
Unanswered
jstangroome
asked this question in
Q&A
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've discovered its easy to end up with the same Field logged with different variations on a key name in different parts of a code base and this complicates log querying. E.g.
What patterns have people found helps keep key name consistent?
E.g. Use constants?
Or e.g. use custom types?
Or custom types with
MarshalLogObject
andzap.Inline
? Or something else?What do you prefer and why?
Beta Was this translation helpful? Give feedback.
All reactions