From 812b4cbd4b9b37e3c4433a25dd566520ab597093 Mon Sep 17 00:00:00 2001 From: Cao Shufeng Date: Wed, 21 Jun 2017 16:10:06 +0800 Subject: [PATCH] Use glog.*f when a format string is passed ref: https://godoc.org/github.com/golang/glog I use the following commands to search all the invalid usage: $ grep "glog.Warning(" * -r | grep % $ grep "glog.Info(" * -r | grep % $ grep "glog.Error(" * -r | grep % $ grep ").Info(" * -r | grep % | grep "glog.V(" Kubernetes-commit: 0c577c47d5331e61caf11469a52c2583d087cdcf --- tools/cache/mutation_cache.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/cache/mutation_cache.go b/tools/cache/mutation_cache.go index 0fa06bf7..cbb6434e 100644 --- a/tools/cache/mutation_cache.go +++ b/tools/cache/mutation_cache.go @@ -156,7 +156,7 @@ func (c *mutationCache) ByIndex(name string, indexKey string) ([]interface{}, er } elements, err := fn(updated) if err != nil { - glog.V(4).Info("Unable to calculate an index entry for mutation cache entry %s: %v", key, err) + glog.V(4).Infof("Unable to calculate an index entry for mutation cache entry %s: %v", key, err) continue } for _, inIndex := range elements {