Description
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 assume V(4)
to be debug level and V(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-use
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.