-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Supporting log overrides/log markers with log levels #1295
Comments
@aayush19saxena Is your request similar to this |
No, i'd like to keep the same log levels. I just want the logger to use debug level when it encounters an "identifier" in it's configuration. |
I'm not sure if this is a feature that makes sense for you to build into the Zap logger - it can be implemented by additional wrapper layer that has the logic for filtering. My concern here is that the room for what "matches" the filter is going to be fairly extensive, and designing an appropriate API for that is challenging. Open to discussing the feature if enough people need this feature though. |
Is your feature request related to a problem? Please describe.
I would like to log at debug levels when the logger encounters a specific identifier. Say I want to log at trace levels when the
user_id
is123
Describe the solution you'd like
it would be nice if we can configure the logger at the time of initialization to look for certain identifiers. I am really new to Go so can't suggest a solution right off the bat but in Java i used to use logging filters. An example- https://logging.apache.org/log4j/2.0/manual/filters.html
Describe alternatives you've considered
N/A
Is this a breaking change?
We do not accept breaking changes to the existing API. Please consider if your proposed solution is backwards compatible. If not, we can help you make it backwards compatible, but this must be considered when we consider new features.
N/A
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: