-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
🐛 Don't log name and namespace twice #3040
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Tim Ramlot <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: inteon 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 |
@@ -445,9 +444,6 @@ func (blder *TypedBuilder[request]) doController(r reconcile.TypedReconciler[req | |||
log := log | |||
|
|||
if req, ok := any(in).(*reconcile.Request); ok && req != nil { | |||
if hasGVK { | |||
log = log.WithValues(gvk.Kind, klog.KRef(req.Namespace, req.Name)) |
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.
The format of the two is different, this was added to be compatible with the format used by other projects in the ecosystem. Removing this would be a breaking change and I don't see a reason to do that. You can always set up your own logging and make the integrated a no-op.
/hold
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.
Agree. I would like to continue to align with the k/k log format
Currently, the logs for my controller look like this:
Notice that
Test="namespace1/resource1"
just repeats information that was already available in other key-value pairs (controllerKind="Test"
,namespace="namespace1"
andname="resource1"
).After this PR, the logs look like this: