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

add CLI options for tuning logging #261

Merged
merged 1 commit into from
Jun 13, 2024
Merged

Conversation

ushitora-anqou
Copy link
Contributor

@ushitora-anqou ushitora-anqou commented Jun 6, 2024

Fix #259

This commit adds the following CLI options to tune logging:

  • -zap-devel
  • -zap-encoder
  • -zap-log-level
  • -zap-stacktrace-level
  • -zap-time-encoding

See also: https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/log/zap#Options.BindFlags

@ushitora-anqou ushitora-anqou force-pushed the add-log-level-option branch 7 times, most recently from 62f3d69 to 93e9e45 Compare June 10, 2024 09:01
@ushitora-anqou ushitora-anqou changed the title add --log-level option to tune verbosity of logging add CLI options for tuning logging and remove -development option Jun 10, 2024
@ushitora-anqou ushitora-anqou marked this pull request as ready for review June 10, 2024 09:22
@ushitora-anqou ushitora-anqou requested a review from a team as a code owner June 10, 2024 09:22
Copy link
Member

@satoru-takeuchi satoru-takeuchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How abount keep --develoment flag as is to keep compatibility, or write down "--development option was replaced by ``zap-devel` option" in release note?

This commit adds the following CLI options to tune logging:

- `-zap-devel`
- `-zap-encoder`
- `-zap-log-level`
- `-zap-stacktrace-level`
- `-zap-time-encoding`

See also: https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/log/zap#Options.BindFlags

Signed-off-by: Ryotaro Banno <[email protected]>
@ushitora-anqou ushitora-anqou changed the title add CLI options for tuning logging and remove -development option add CLI options for tuning logging Jun 11, 2024
@ushitora-anqou
Copy link
Contributor Author

@satoru-takeuchi

How abount keep --develoment flag as is to keep compatibility, or write down "--development option was replaced by ``zap-devel` option" in release note?

You're right. I restored --development flag to keep compatibility. Could you review this again?

@daichimukai daichimukai merged commit fa8cd0f into main Jun 13, 2024
12 checks passed
@daichimukai daichimukai deleted the add-log-level-option branch June 13, 2024 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Feature]: Flag to set log level
3 participants