Support contextual logging
What type of PR is this?
/kind feature
What this PR does / why we need it:
I've updated the klog functions used within csi-lib-utils to contextual logging functions, following the guidelines below: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/migration-to-structured-logging.md
In a previous PR below, I addressed structured logging, but I realized that I only handled structured logging and did not address contextual logging. https://github.com/kubernetes-csi/external-health-monitor/pull/208
Therefore, in this PR, I have addressed contextual logging.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
- Added contextual logging checks using logcheck. (You can run logcheck with
make testormake logcheck) - Removed unused functions and arguments.
Does this PR introduce a user-facing change?:
Added support for contextual logging.
Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all
/wg structured-logging /area logging /priority important-longterm /kind cleanup /cc @kubernetes/wg-structured-logging-reviews
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/migration-to-structured-logging.md#what-to-include-in-the-pull-request
@bells17: GitHub didn't allow me to request PR reviews from the following users: kubernetes/wg-structured-logging-reviews.
Note that only kubernetes-csi members and repo collaborators can review this PR, and authors cannot review their own PRs.
In response to this:
/wg structured-logging /area logging /priority important-longterm /kind cleanup /cc @kubernetes/wg-structured-logging-reviews
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.
@bells17: The label(s) area/logging cannot be applied, because the repository doesn't have them.
In response to this:
/wg structured-logging /area logging /priority important-longterm /kind cleanup /cc @kubernetes/wg-structured-logging-reviews
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.
/cc @pohly (I did cc because @pohly is the only member of @kubernetes/wg-structured-logging-reviews within kubernetes-csi org.)
/hold
https://kubernetes.slack.com/archives/C09QZFCE5/p1715087356356999
/hold cancel logcheck crash was fixed.
/lgtm /approve
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: bells17, jsafrane
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [jsafrane]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment