Skip to content

Conversation

@ipochi
Copy link
Contributor

@ipochi ipochi commented Sep 19, 2025

This reverts commit 4ce5f06.

This commit reverts a previous modification to the flag handling logic in the agent and server's main() functions.

A prior change introduced a condition (if local.Lookup("v") == nil) before setting the default klog verbosity level. This condition was incorrect because klog.InitFlags() always defines the -v flag, meaning the default verbosity was never being applied. This caused the effective log level to fall back to klog's default of 0 instead of the intended 4.

This change restores the original, correct behavior by unconditionally setting the verbosity to 4. This ensures logs are visible by default while still allowing the user to override the setting via the command line.

#685 (comment)

Fixes: #780

…g-level-from-args"

This reverts commit 4ce5f06.

This commit reverts a previous modification to the flag handling logic
in the agent and server's main() functions.

A prior change introduced a condition (`if local.Lookup("v") == nil`)
before setting the default klog verbosity level. This condition was
incorrect because `klog.InitFlags()` always defines the `-v` flag,
meaning the default verbosity was never being applied. This caused the
effective log level to fall back to klog's default of `0` instead of the
intended `4`.

This change restores the original, correct behavior by unconditionally
setting the verbosity to `4`. This ensures logs are visible by default
while still allowing the user to override the setting via the command
line.
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 19, 2025
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 19, 2025
@cheftako
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 19, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cheftako, ipochi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

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 merged commit ae3b7c4 into kubernetes-sigs:release-0.31 Sep 19, 2025
7 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/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants