Additional logging to GCS retry loop

This commit is contained in:
Jarek Kowalski
2016-09-27 21:07:01 -07:00
parent 3255606f48
commit fbda265822

View File

@@ -30,7 +30,11 @@ func retry(desc string, f func() (interface{}, error)) (interface{}, error) {
v, err = f()
}
if retryCount > 0 {
log.Printf("Success calling %v after %v retries.", desc, retryCount)
if err == nil {
log.Printf("Success calling %v after %v retries.", desc, retryCount)
} else {
log.Printf("Permanent failure calling %v after %v retries.", desc, retryCount)
}
}
return v, err
}