@@ -247,7 +247,7 @@ func (c *Controller) syncPod(ctx context.Context, pod *corev1.Pod) error {
247247 instanceID := awssdk .StringValue (instance .Id )
248248 serviceName := awssdk .StringValue (instance .Attributes [ctrlaws .AttrK8sApp ])
249249
250- klog .V (4 ).Info ("Pod: %s is currently registered with the service: %s" , podName , serviceName )
250+ klog .V (4 ).Infof ("Pod: %s is currently registered with the service: %s" , podName , serviceName )
251251 serviceInstanceSummary [instanceID ] = true
252252 }
253253
@@ -266,14 +266,15 @@ func (c *Controller) syncPod(ctx context.Context, pod *corev1.Pod) error {
266266 serviceInstanceSummary = serviceItem .instanceSummary
267267 serviceInstanceSummary [pod .Status .PodIP ] = true
268268 } else {
269- klog .V (4 ).Info ("Instance already %s registered under service %s" , pod .Name , * cloudmapConfig .ServiceName )
269+ klog .V (4 ).Infof ("Instance already %s registered under service %s" , pod .Name , * cloudmapConfig .ServiceName )
270270 return nil
271271 }
272272 } else {
273273 serviceInstanceSummary [pod .Status .PodIP ] = true
274274 }
275275
276- klog .Info ("Registering instance %s under service %s" , pod .Name , * cloudmapConfig .ServiceName )
276+ // FIXME emitting this log is confusing when we might short-circuit in RegisterInstance
277+ klog .Infof ("Registering instance %s under service %s" , pod .Name , * cloudmapConfig .ServiceName )
277278 err = c .cloud .RegisterInstance (ctx , instanceID , pod , cloudmapConfig )
278279 if err != nil {
279280 return err
@@ -298,7 +299,7 @@ func (c *Controller) getServiceInstancesFromCloudMap(ctx context.Context,
298299 return instances , err
299300 }
300301
301- klog .V (4 ).Info ("Reach out to CloudMap for service: %s. Current Instance Count: " ,
302+ klog .V (4 ).Infof ("Reach out to CloudMap for service: %s. Current Instance Count: %d " ,
302303 * appmeshCloudMapConfig .ServiceName , len (instances ))
303304 return instances , nil
304305}
0 commit comments