-
Notifications
You must be signed in to change notification settings - Fork 20
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 slog
structured logging to main controllers
#213
Add slog
structured logging to main controllers
#213
Conversation
bede768
to
33c042b
Compare
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.
Let's enable sloglint which is available via golangci-lint: https://github.com/go-simpler/sloglint?tab=readme-ov-file#-install
added slog lint |
d1eb224
to
15a271e
Compare
d11da7b
to
f81bd3f
Compare
/test integration-test |
662c1bf
to
556f8ff
Compare
Integrated slog logging into the MirrorPeerSecretReconciler, MirrorPeerReconciler, and DRPolicyReconciler controllers. Improved error handling and logging for better observability and debugging. Replaced klog with slog for consistency across the codebase. Changes include: Added Logger field to controller structs to pass and use slog.Logger. Enhanced logging messages to provide more context, including function names, object names, namespaces, and error details. Signed-off-by: vbadrina <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: umangachapagain, vbnrh 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 |
b669e51
into
red-hat-storage:main
slog
logging into theMirrorPeerSecretReconciler
,MirrorPeerReconciler
, andDRPolicyReconciler
controllers.Changes include:
Logger
field to controller structs to pass and useslog.Logger
.Example of the change -