-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkg/logger/logkey: new package for log key glossary #986
base: main
Are you sure you want to change the base?
Conversation
What is the intended use of the keys from logkey? Is this for labelling with ZAP's zap.String(key, value) construction, or is it for arbitrary string / int constants that can be used for logging in a centralized way? |
We don't typically use the zap field API like that, but that would be valid. More often we just call the |
I see, so are you planning to extract all the possible keys in some kind of automatic way? Or would you just keep adding them here continuously? |
We could try to start with some automation, but adding keys manually would be sufficient for most common inconsistencies. I did consider providing zap field support as well, but I'm not sure how that should work. Even just |
Sound good. Thanks for explaining! |
This PR introduces a new
package logkey
to serve as a glossary of logger keys in order to align common fields.