Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logging: fix 'backing off for x' message formatting #202

Merged
merged 1 commit into from
Dec 22, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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