You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So the mapping between the two seems off, furthermore most users of zap are likely to not be aware that the log level is an int8 under the hood and can have values outside of the defined named set. We should find a way so that the named debug in zap corresponds to something resembling a debug log level in the glog/klog/logr universe.
The text was updated successfully, but these errors were encountered:
Just want to mention that component-base uses zap for JSON logging under the hood (while they use klog for text). I didn't look up the details, but sounds like they are using zap in a way that the log levels are treated the same way between zap & klog.
(not saying that's the right "solution", just a data point)
The named
debug
log level of zap corresponds to the numeric value-1
, which then gets inverted by zapr and thus corresponds toV(1)
. At the same time, the Kubernetes logging guidelines assumeV(4)
to be debug level andV(1)
A reasonable default log level if you don't want verbosity
: https://github.com/kubernetes/community/blob/905825353d20c57817806dd5aab242ea6c703024/contributors/devel/sig-instrumentation/logging.md#what-method-to-useSo the mapping between the two seems off, furthermore most users of zap are likely to not be aware that the log level is an int8 under the hood and can have values outside of the defined named set. We should find a way so that the named
debug
in zap corresponds to something resembling a debug log level in the glog/klog/logr universe.The text was updated successfully, but these errors were encountered: