From ae2f6a833af0a4c64a0bd9166cbc1868ba4f8a43 Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Sat, 20 Feb 2016 15:07:23 -0500 Subject: [PATCH] Reduce volume of logs generated at v(3) Node controller is generating a huge amount of logging at v(3) that is more appropriate for v(5). Split the log into two levels and ensure it also ends up on one line (so grep works). The pod manager generates a v(4) pod output on sync that always contains a newline - since the size of the pod is so excessive in output, kick it to v(5) for deep debugging (we're pretty happy with this loop). --- pkg/controller/node/nodecontroller.go | 6 +++++- pkg/kubelet/dockertools/manager.go | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkg/controller/node/nodecontroller.go b/pkg/controller/node/nodecontroller.go index b2535d01676..5e7554986a6 100644 --- a/pkg/controller/node/nodecontroller.go +++ b/pkg/controller/node/nodecontroller.go @@ -645,7 +645,11 @@ func (nc *NodeController) tryUpdateNodeStatus(node *api.Node) (time.Duration, ap } else { transitionTime = savedNodeStatus.readyTransitionTimestamp } - glog.V(3).Infof("Nodes ReadyCondition updated. Updating timestamp: %+v\n vs %+v.", savedNodeStatus.status, node.Status) + if glog.V(5) { + glog.Infof("Node %s ReadyCondition updated. Updating timestamp: %+v vs %+v.", node.Name, savedNodeStatus.status, node.Status) + } else { + glog.V(3).Infof("Node %s ReadyCondition updated. Updating timestamp.", node.Name) + } savedNodeStatus = nodeStatusData{ status: node.Status, probeTimestamp: nc.now(), diff --git a/pkg/kubelet/dockertools/manager.go b/pkg/kubelet/dockertools/manager.go index 7bd47ce82bf..47dea72e878 100644 --- a/pkg/kubelet/dockertools/manager.go +++ b/pkg/kubelet/dockertools/manager.go @@ -1607,7 +1607,7 @@ func (dm *DockerManager) computePodContainerChanges(pod *api.Pod, podStatus *kub defer func() { metrics.ContainerManagerLatency.WithLabelValues("computePodContainerChanges").Observe(metrics.SinceInMicroseconds(start)) }() - glog.V(4).Infof("Syncing Pod %q: %+v", format.Pod(pod), pod) + glog.V(5).Infof("Syncing Pod %q: %+v", format.Pod(pod), pod) containersToStart := make(map[int]string) containersToKeep := make(map[kubecontainer.DockerID]int)