From 8aa299da907040d9c31b4dd9d1b1d49344c5aad3 Mon Sep 17 00:00:00 2001 From: Miciah Masters Date: Wed, 19 Aug 2015 15:45:37 -0400 Subject: [PATCH] glog.Warning -> glog.Warningf Fix three places where glog.Warning is used with a formatted string. --- pkg/cloudprovider/providers/aws/aws.go | 2 +- pkg/kubelet/metrics/metrics.go | 2 +- pkg/util/iptables/iptables.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/cloudprovider/providers/aws/aws.go b/pkg/cloudprovider/providers/aws/aws.go index 3a049718e56..1c61f4f8d5f 100644 --- a/pkg/cloudprovider/providers/aws/aws.go +++ b/pkg/cloudprovider/providers/aws/aws.go @@ -1797,7 +1797,7 @@ func findSecurityGroupForInstance(instance *ec2.Instance) *string { if securityGroupId != nil { // We create instances with one SG - glog.Warning("Multiple security groups found for instance (%s); will use first group (%s)", orEmpty(instance.InstanceID), *securityGroupId) + glog.Warningf("Multiple security groups found for instance (%s); will use first group (%s)", orEmpty(instance.InstanceID), *securityGroupId) continue } else { securityGroupId = securityGroup.GroupID diff --git a/pkg/kubelet/metrics/metrics.go b/pkg/kubelet/metrics/metrics.go index 251f2b06811..6fb4e1335f8 100644 --- a/pkg/kubelet/metrics/metrics.go +++ b/pkg/kubelet/metrics/metrics.go @@ -163,7 +163,7 @@ func (pc *podAndContainerCollector) Describe(ch chan<- *prometheus.Desc) { func (pc *podAndContainerCollector) Collect(ch chan<- prometheus.Metric) { runningPods, err := pc.containerCache.GetPods() if err != nil { - glog.Warning("Failed to get running container information while collecting metrics: %v", err) + glog.Warningf("Failed to get running container information while collecting metrics: %v", err) return } diff --git a/pkg/util/iptables/iptables.go b/pkg/util/iptables/iptables.go index 35f4d842977..d78cae6c5c6 100644 --- a/pkg/util/iptables/iptables.go +++ b/pkg/util/iptables/iptables.go @@ -310,7 +310,7 @@ func (runner *runner) run(op operation, args []string) ([]byte, error) { func (runner *runner) checkRule(table Table, chain Chain, args ...string) (bool, error) { checkPresent, err := getIptablesHasCheckCommand(runner.exec) if err != nil { - glog.Warning("Error checking iptables version, assuming version at least 1.4.11: %v", err) + glog.Warningf("Error checking iptables version, assuming version at least 1.4.11: %v", err) checkPresent = true } if checkPresent {