Skip to content

Commit

Permalink
Merge pull request #202 from jehiah/backoff_log_msg_fix_202
Browse files Browse the repository at this point in the history
logging: fix 'backing off for x' message formatting
  • Loading branch information
mreiferson authored Dec 22, 2016
2 parents 8e6d40f + ffe14ca commit 1f76a74
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -802,8 +802,8 @@ func (r *Consumer) startStopContinueBackoff(conn *Conn, signal backoffSignal) {
backoffDuration = r.config.MaxBackoffDuration
}

r.log(LogLevelWarning, "backing off for %.04f seconds (backoff level %d), setting all to RDY 0",
backoffDuration.Seconds(), backoffCounter)
r.log(LogLevelWarning, "backing off for %s (backoff level %d), setting all to RDY 0",
backoffDuration, backoffCounter)

// send RDY 0 immediately (to *all* connections)
for _, c := range r.conns() {
Expand All @@ -829,7 +829,7 @@ func (r *Consumer) resume() {
conns := r.conns()
if len(conns) == 0 {
r.log(LogLevelWarning, "no connection available to resume")
r.log(LogLevelWarning, "backing off for %.04f seconds", 1)
r.log(LogLevelWarning, "backing off for %s", time.Second)
r.backoff(time.Second)
return
}
Expand All @@ -846,7 +846,7 @@ func (r *Consumer) resume() {
err := r.updateRDY(choice, 1)
if err != nil {
r.log(LogLevelWarning, "(%s) error resuming RDY 1 - %s", choice.String(), err)
r.log(LogLevelWarning, "backing off for %.04f seconds", 1)
r.log(LogLevelWarning, "backing off for %s", time.Second)
r.backoff(time.Second)
return
}
Expand Down

0 comments on commit 1f76a74

Please sign in to comment.