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

klogr verbosity #295

Merged
merged 3 commits into from
Feb 15, 2022
Merged

klogr verbosity #295

merged 3 commits into from
Feb 15, 2022

Commits on Feb 15, 2022

  1. test: move output test to example, include zapr

    To reproduce the loss of verbosity in
    klogr (kubernetes#294) we need a backend which
    actually emits the verbosity. zapr does that and also happens to be the logging
    implementation used in Kubernetes for JSON, so it makes sense to test with
    that.
    
    The expected output mapping may be useful also for testing in Kubernetes,
    therefore it gets exported by k8s.io/klog/v2/test.
    
    Because k8s.io/klog/v2 must not depend on zapr, the actual output test gets
    moved to the examples. The downside is that "go test ./..." no longer runs it.
    One has to remember to enter the "examples" directory. The GitHub action gets
    updated to do that.
    pohly committed Feb 15, 2022
    Configuration menu
    Copy the full SHA
    bb978b3 View commit details
    Browse the repository at this point in the history
  2. klogr: pass verbosity level through to klog

    That wasn't (and still isn't) necessary when klog itself emits the log entry
    because it doesn't log the verbosity. But when SetLogger was used to enabled
    logging through a backend logger, that logger may care about the verbosity
    level.
    pohly committed Feb 15, 2022
    Configuration menu
    Copy the full SHA
    a58a994 View commit details
    Browse the repository at this point in the history
  3. github: split up test steps

    Splitting up the tests ensures that each step runs in the right directory
    without having to rely on more complex shell scripting. That failures get
    reported separately is an added bonus.
    
    The simpler `(cd hack/tools && go test ./...)` wasn't supported by Windows.
    pohly committed Feb 15, 2022
    Configuration menu
    Copy the full SHA
    7dac793 View commit details
    Browse the repository at this point in the history