Honor stderrthreshold when logtostderr is enabled#1253
Honor stderrthreshold when logtostderr is enabled#1253k8s-ci-robot merged 1 commit intokubernetes:masterfrom
Conversation
Opt into the fixed klog behavior by setting legacy_stderr_threshold_behavior=false after klog.InitFlags(). Ref: kubernetes/klog#212, kubernetes/klog#432 Signed-off-by: Pierluigi Lenoci <pierluigi.lenoci@gmail.com>
|
Hi @Random-Liu, @hakman, @wangzhen127 — would you be willing to review? Thank you! |
|
Thanks for the PR @pierluigilenoci! 🙂 |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hakman, pierluigilenoci The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/override pull-npd-e2e-test |
|
@hakman: Overrode contexts on behalf of hakman: pull-npd-e2e-test DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Summary
Opt into the new klog behavior so that
-stderrthresholdis honored even when-logtostderr=true(the default). Setstderrthreshold=INFOto preserve backward compatibility.Background
When
-logtostderr=true,-stderrthresholdwas ignored — all logs went to stderr. Fixed in kubernetes/klog#432 (v2.140.0+), but projects must opt in.References