Skip to content

Zapr log levels don't align with glog/klog recommendations #3081

Open
@alvaroaleman

Description

@alvaroaleman

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions