Skip to content

Commit

Permalink
These can happen a lot & should be at a lower level then ERROR. Bumpi…
Browse files Browse the repository at this point in the history
…ng down to DEBUG. (#441)
  • Loading branch information
schmidtw authored and kcajmagic committed Nov 15, 2019
1 parent 77d97b1 commit e6f1599
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xhttp/retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func RetryTransactor(o RetryOptions, next func(*http.Request) (*http.Response, e
for r := 0; r < o.Retries && ((err != nil && o.ShouldRetry(err)) || o.ShouldRetryStatus(statusCode)); r++ {
o.Counter.Add(1.0)
o.Sleep(o.Interval)
o.Logger.Log(level.Key(), level.ErrorValue(), logging.MessageKey(), "retrying HTTP transaction", "url", request.URL.String(), logging.ErrorKey(), err, "retry", r+1, "statusCode", statusCode)
o.Logger.Log(level.Key(), level.DebugValue(), logging.MessageKey(), "retrying HTTP transaction", "url", request.URL.String(), logging.ErrorKey(), err, "retry", r+1, "statusCode", statusCode)

if err := Rewind(request); err != nil {
return nil, err
Expand All @@ -140,7 +140,7 @@ func RetryTransactor(o RetryOptions, next func(*http.Request) (*http.Response, e
}

if err != nil {
o.Logger.Log(level.Key(), level.ErrorValue(), logging.MessageKey(), "All HTTP transaction retries failed", "url", request.URL.String(), logging.ErrorKey(), err, "retries", o.Retries)
o.Logger.Log(level.Key(), level.DebugValue(), logging.MessageKey(), "All HTTP transaction retries failed", "url", request.URL.String(), logging.ErrorKey(), err, "retries", o.Retries)
}

return response, err
Expand Down

0 comments on commit e6f1599

Please sign in to comment.