Skip to content

Honor stderrthreshold when logtostderr is enabled#1253

Merged
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
pierluigilenoci:fix/honor-stderrthreshold
Mar 27, 2026
Merged

Honor stderrthreshold when logtostderr is enabled#1253
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
pierluigilenoci:fix/honor-stderrthreshold

Conversation

@pierluigilenoci
Copy link
Copy Markdown
Contributor

Summary

Opt into the new klog behavior so that -stderrthreshold is honored even when -logtostderr=true (the default). Set stderrthreshold=INFO to preserve backward compatibility.

Background

When -logtostderr=true, -stderrthreshold was ignored — all logs went to stderr. Fixed in kubernetes/klog#432 (v2.140.0+), but projects must opt in.

References

Honor stderrthreshold when logtostderr is enabled

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>
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 26, 2026
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 26, 2026
@pierluigilenoci
Copy link
Copy Markdown
Contributor Author

Hi @Random-Liu, @hakman, @wangzhen127 — would you be willing to review? Thank you!

@hakman
Copy link
Copy Markdown
Member

hakman commented Mar 27, 2026

Thanks for the PR @pierluigilenoci! 🙂
/lgtm
/retest

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 27, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 27, 2026
@hakman
Copy link
Copy Markdown
Member

hakman commented Mar 27, 2026

/override pull-npd-e2e-test

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

@hakman: Overrode contexts on behalf of hakman: pull-npd-e2e-test

Details

In response to this:

/override pull-npd-e2e-test

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.

@k8s-ci-robot k8s-ci-robot merged commit b2c5cf2 into kubernetes:master Mar 27, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants