@@ -236,11 +236,11 @@ func (t *ClusterCacheTracker) deleteAccessor(cluster client.ObjectKey) {
236236 return
237237 }
238238
239- t .log .V ( 2 ). Info ( "Deleting clusterAccessor " , "Cluster" , cluster .String ( ))
240-
241- t .log .V (4 ).Info ("Stopping cache" , "Cluster" , cluster . String () )
239+ t .log .WithValues ( "cluster " , klog . KRef ( cluster . Namespace , cluster .Name ))
240+ t . log . V ( 2 ). Info ( "Deleting clusterAccessor" )
241+ t .log .V (4 ).Info ("Stopping cache" )
242242 a .cache .Stop ()
243- t .log .V (4 ).Info ("Cache stopped" , "Cluster" , cluster . String () )
243+ t .log .V (4 ).Info ("Cache stopped" )
244244
245245 delete (t .clusterAccessors , cluster )
246246}
@@ -287,7 +287,7 @@ func (t *ClusterCacheTracker) Watch(ctx context.Context, input WatchInput) error
287287 }
288288
289289 if a .watches .Has (input .Name ) {
290- t .log .V (6 ).Info ("Watch already exists" , "Namespace " , klog .KRef (input .Cluster .Namespace , "" ), "Cluster " , klog .KRef (input .Cluster .Namespace , input .Cluster .Name ), "Name" , input .Name )
290+ t .log .V (6 ).Info ("Watch already exists" , "namespace " , klog .KRef (input .Cluster .Namespace , "" ), "cluster " , klog .KRef (input .Cluster .Namespace , input .Cluster .Name ), "Name" , input .Name )
291291 return nil
292292 }
293293
@@ -392,7 +392,7 @@ func (t *ClusterCacheTracker) healthCheckCluster(ctx context.Context, in *health
392392 // NB. we are ignoring ErrWaitTimeout because this error happens when the channel is close, that in this case
393393 // happens when the cache is explicitly stopped.
394394 if err != nil && err != wait .ErrWaitTimeout {
395- t .log .Error (err , "Error health checking cluster" , "Cluster " , klog .KRef (in .cluster .Namespace , in .cluster .Name ))
395+ t .log .Error (err , "Error health checking cluster" , "cluster " , klog .KRef (in .cluster .Namespace , in .cluster .Name ))
396396 t .deleteAccessor (in .cluster )
397397 }
398398}
0 commit comments