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
This commit is contained in:
Cao Shufeng 2017-06-21 16:10:06 +08:00 committed by Kubernetes Publisher
parent 3bb413eede
commit 812b4cbd4b

View File

@ -156,7 +156,7 @@ func (c *mutationCache) ByIndex(name string, indexKey string) ([]interface{}, er
} }
elements, err := fn(updated) elements, err := fn(updated)
if err != nil { 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 continue
} }
for _, inIndex := range elements { for _, inIndex := range elements {