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
Make it possible to exclude fields from console log #411
Comments
Oh, I hoped that #411 also added |
pablitoc
pushed a commit
to nxcr-org/zerolog
that referenced
this issue
Apr 7, 2023
This has been merged. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello! Thanks for all the great work on zerolog, it's been a pleasure to use.
We are using zerolog in a CLI tool with two writers, one to the console at info level and another to a file at debug level, using the solution described here.
We would like to add some additional context fields to all messages for debugging (for example, process id to distinguish between separate invocations of the tool), but don't want to include those fields in the console log because they add clutter.
I see there are already
PartsExclude
andPartsOrder
options in the console logger for excluding some default fields. Would you be open to a PR for new options,FieldsExclude
andFieldsOrder
, that do the same thing but for contextual fields?If there is a better way to accomplish what we are after, that works too!
The text was updated successfully, but these errors were encountered: