-
Notifications
You must be signed in to change notification settings - Fork 28
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
Panic when using production configs and small log level #2
Comments
@DirectXMan12 This is due to sampling I believe. We worked around this the operator-sdk by forcing a user who goes below the debug level for zap to turn off sampling. I could submit a PR here if that logic makes sense to you. |
We could do that. Might want to rethink our levels and/or get a fix into Zap too -- IIRC, something in the Zap docs said you were allowed to do levels lower than debug, but I can't seem to find it now. |
My understanding is that this logic would work only if the log level is static (don't change after initial config). |
Yeah, it's mainly due to how we map numbers to log levels. We talked to the zap folks at some point IIRC, and they weren't super-enthused about custom log levels existing and mostly considered what we're doing to be a bit of a hack (see uber-go/zap#713). I'm not quite sure what we want to do. |
After 1.0.0-rc. (#28) this seems to be fixed. |
This is related with this issue.
When trying to use other log levels smaller than -1 (e.g. V(2)) with
cfg := zap.NewProductionConfig()
(with development config works fine) I've got the following panic error:The text was updated successfully, but these errors were encountered: