-
Notifications
You must be signed in to change notification settings - Fork 141
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 support to configure logging format #129
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: aramase 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 |
Welcome @aramase! |
Hi @aramase. Thanks for your PR. I'm waiting for a kubernetes-csi member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/ok-to-test |
/retest |
Hey @aramase , can you help to rebase and update the dependency to 0.20? Thanks a lot! |
@Jiawei0227 for sure! |
f3a65c5
to
b3d0775
Compare
b3d0775
to
4e63cf4
Compare
/lgtm |
/assign @msau42 |
@@ -53,6 +54,7 @@ var ( | |||
healthzPort = flag.Int("health-port", 0, "(deprecated) TCP port for healthz requests. Set to 0 to disable the healthz server. Only one of `--health-port` and `--http-endpoint` can be set.") | |||
httpEndpoint = flag.String("http-endpoint", "", "The TCP network address where the HTTP server for diagnostics, including the health check indicating whether the registration socket exists, will listen (example: `:8080`). The default is empty string, which means the server is disabled. Only one of `--health-port` and `--http-endpoint` can be set.") | |||
showVersion = flag.Bool("version", false, "Show version.") | |||
logFormatJSON = flag.Bool("log-format-json", false, "set log formatter to json") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like component base already supports a log format flag, so I'm not sure we need to explicitly add one here:
https://github.com/kubernetes/component-base/blob/master/logs/options.go#L89
I think it would be better if we switch to component-base log pkg instead of using klog directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, let me do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated, PTAL!
4e63cf4
to
715c866
Compare
New changes are detected. LGTM label has been removed. |
@aramase could you please fix the conflict? |
@aramase any feedback from the community? |
Revisiting this again. Now that Kubernetes has introduced structured logging, do we still want the changes here, or do we want to consider following what Kubernetes is doing? |
Even with structured logging we would need to support the json log format so I think we would still need this PR. I can help with using structured logging in a separate PR for the node-driver-registrar, liveness-probe and dust off this PR for review again. Let me know. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
@aramase any feedback from the community? |
@pierluigilenoci There has been some discussion on the PRs. I will let the maintainers of the node-driver-registrar and liveness probe decide how they want to proceed with supporting json log formatting. I don't have the time currently for rebasing the 2 PRs, so I'm going to close them and let someone else pick up the issue if there is interest in supporting the json log format. /close |
@aramase: Closed this PR. In response to this:
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. |
Work in this area will be tracked via this project board: https://github.com/orgs/kubernetes-csi/projects/46 |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Adds configuration for json log formatter
Which issue(s) this PR fixes:
Fixes #128
Special notes for your reviewer:
Does this PR introduce a user-facing change?: