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

logger: add zap command line switches #1280

Merged

Conversation

ykaliuta
Copy link
Contributor

@ykaliuta ykaliuta commented Oct 7, 2024

Allow to tune preconfigured by --log-mode zap backend with standard zap command line switches from controller-runtime (zap-devel, zap-encoder, zap-log-level, zap-stacktrace-level,
zap-time-encoding).

This brings flexibility in logger setup for development environments first of all.

The patch does not change default logger setup and does not change DSCI override functionality.

This is a part of #1268

Description

How Has This Been Tested?

Screenshot or short clip

Merge criteria

  • You have read the contributors guide.
  • Commit messages are meaningful - have a clear and concise summary and detailed explanation of what was changed and why.
  • Pull Request contains a description of the solution, a link to the JIRA issue, and to any dependent or related Pull Request.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

@ykaliuta ykaliuta force-pushed the zap-command-line branch 2 times, most recently from b3994bb to 4b5b3f6 Compare October 7, 2024 21:33
Allow to tune preconfigured by --log-mode zap backend with standard
zap command line switches from controller-runtime (zap-devel,
zap-encoder, zap-log-level, zap-stacktrace-level,
zap-time-encoding)[1].

This brings flexibility in logger setup for development environments
first of all.

The patch does not change default logger setup and does not change
DSCI override functionality.

[1] https://sdk.operatorframework.io/docs/building-operators/golang/references/logging

Signed-off-by: Yauheni Kaliuta <[email protected]>
@ykaliuta
Copy link
Contributor Author

ykaliuta commented Oct 8, 2024

/cc @zdtsw @lburgazzoli

@VaishnaviHire
Copy link
Member

@ykaliuta Can you also add, maybe in #1268 PR, documentation in troubleshooting

/lgtm

Copy link

openshift-ci bot commented Oct 8, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: VaishnaviHire

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

@openshift-ci openshift-ci bot added the approved label Oct 8, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit d022865 into opendatahub-io:incubation Oct 8, 2024
8 checks passed
@ykaliuta
Copy link
Contributor Author

ykaliuta commented Oct 8, 2024

@ykaliuta Can you also add, maybe in #1268 PR, documentation in troubleshooting

With pleasure! But probably we can get more advantage after review of our messages and adding more debug level ones.

Copy link
Member

@zdtsw zdtsw left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants