always pass a cluster name as a logger field

This commit is contained in:
Murat Kabilov
2017-08-15 10:29:18 +02:00
parent e26db66cb5
commit 5470f20be4
6 changed files with 38 additions and 33 deletions
+4 -1
View File
@@ -45,7 +45,10 @@ func (c *Controller) dispatchPodEvent(clusterName spec.NamespacedName, event spe
cluster, ok := c.clusters[clusterName]
c.clustersMu.RUnlock()
if ok {
c.logger.Debugf("sending %q event of pod %q to the %q cluster channel", event.EventType, event.PodName, clusterName)
c.logger.WithField("cluster-name", clusterName).
Debugf("sending %q event of pod %q to the cluster channel",
event.EventType,
event.PodName)
cluster.ReceivePodEvent(event)
}
}