Skip to content
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

add Verbose.InfoSDepth #277

Merged
merged 1 commit into from Dec 17, 2021
Merged

add Verbose.InfoSDepth #277

merged 1 commit into from Dec 17, 2021

Commits on Dec 14, 2021

  1. add Verbose.InfoSDepth

    It is needed in Kubernetes for code like this (from
    k8s.io/apiserver/pkg/server/httplog/httplog.go):
    
      // Log is intended to be called once at the end of your request handler, via defer
      func (rl *respLogger) Log() {
              ...
    
              klog.V(withLoggingLevel).InfoSDepth(1, "HTTP", keysAndValues...)
      }
    
    Without InfoSDepth as method for Verbose, such code has to use klog.InfoSDepth,
    which records the message with v=0 in JSON output. This is the wrong verbosity
    for this debug message.
    
    We don't need Verbose.ErrorSDepth (error messages have no verbosity) and also
    no Verbose.Info[f]Depth (when touching code, it should be rewritten to use
    Verbose.InfoSDepth instead)
    pohly committed Dec 14, 2021
    Configuration menu
    Copy the full SHA
    b605dee View commit details
    Browse the repository at this point in the history