From 4bef8af68574a7cdc3351d74d5e9435b2b7022cc Mon Sep 17 00:00:00 2001 From: Di Xu Date: Sat, 29 Jul 2017 13:54:09 +0800 Subject: [PATCH] avoid newline "\n" in the error to break log msg to 2 lines --- .../goroutinemap/exponentialbackoff/exponential_backoff.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/util/goroutinemap/exponentialbackoff/exponential_backoff.go b/pkg/util/goroutinemap/exponentialbackoff/exponential_backoff.go index 9dbad16a203..8cd00a4d44b 100644 --- a/pkg/util/goroutinemap/exponentialbackoff/exponential_backoff.go +++ b/pkg/util/goroutinemap/exponentialbackoff/exponential_backoff.go @@ -69,9 +69,8 @@ func (expBackoff *ExponentialBackoff) Update(err *error) { expBackoff.lastErrorTime = time.Now() } -func (expBackoff *ExponentialBackoff) GenerateNoRetriesPermittedMsg( - operationName string) string { - return fmt.Sprintf("Operation for %q failed. No retries permitted until %v (durationBeforeRetry %v). Error: %v", +func (expBackoff *ExponentialBackoff) GenerateNoRetriesPermittedMsg(operationName string) string { + return fmt.Sprintf("Operation for %q failed. No retries permitted until %v (durationBeforeRetry %v). Error: %q", operationName, expBackoff.lastErrorTime.Add(expBackoff.durationBeforeRetry), expBackoff.durationBeforeRetry,