From fcaf89666fb0d4ecd125f2d138bc514a06baf8d2 Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Thu, 20 Dec 2018 10:27:47 -0800 Subject: [PATCH] Decrease log noise by logging retry loops after the initial attempt --- pkg/util/utils.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/util/utils.go b/pkg/util/utils.go index 88b86368d101..df866c1b187f 100644 --- a/pkg/util/utils.go +++ b/pkg/util/utils.go @@ -97,7 +97,9 @@ func Retry(attempts int, callback func() error) (err error) { func RetryAfter(attempts int, callback func() error, d time.Duration) (err error) { m := MultiError{} for i := 0; i < attempts; i++ { - glog.V(1).Infof("retry loop %d", i) + if i > 0 { + glog.V(1).Infof("retry loop %d", i) + } err = callback() if err == nil { return nil