-
Notifications
You must be signed in to change notification settings - Fork 86
Open
Description
HI, I am using "logr/zapr" combination and I am a bit confused because I am not able to print "WARN" level logs.
To my understanding the following code should result in a log message printed by zap with severity level "warning":
zapLogger, _ := zap.NewProduction()
logger := zapr.NewLogger(zapLogger)
logger.V(-1).Info("Hello")
However, it's still printed with INFO level.
Of course it's because the V-Level is actively set back to 0
when it is negative:
Line 312 in 1be0bc0
if level < 0 { |
On the zapr
side i also find a code section like that: https://github.com/go-logr/zapr/blob/544fccbab1b69101aec26b69db60f876a95e3f12/zapr.go#L187
Where it also seems that non negative numbers are expected.
That leaves me with the question: How can I print logs with Warn level?
Thanks