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
WIP: component-base logs: update klog verbosity also at runtime #124312
base: master
Are you sure you want to change the base?
Conversation
When applying the logging configuration, verbosity settings in klog were already updated. This is important because legacy klog calls (for example, klog.V.Enabled) use the klog verbosity settings even when a logger is installed. But when some code changes the verbosity at runtime via fs.Lookup("v").Value.Set("5"), only the component-base logger settings were updated. Now the Set call also updates klog.
Skipping CI for Draft Pull Request. |
Please note that we're already in Test Freeze for the Fast forwards are scheduled to happen every 6 hours, whereas the most recent run was: Mon Apr 15 07:54:03 UTC 2024. |
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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/test-infra repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: pohly The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
What this PR does / why we need it:
When applying the logging configuration, verbosity settings in klog were already updated. This is important because legacy klog calls (for example, klog.V.Enabled) use the klog verbosity settings even when a logger is installed.
But when some code changes the verbosity at runtime via fs.Lookup("v").Value.Set("5"), only the component-base logger settings were updated. Now the Set call also updates klog.
Special notes for your reviewer:
The receiver type of the methods gets changed to pointer because:
WIP: needs tests...
Does this PR introduce a user-facing change?