From fad8932d75c07431919f7663bd656eb67c8d04c0 Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Wed, 19 Jun 2019 19:57:59 -0700 Subject: [PATCH] watchtower/multi: fix logging in wtclient --- watchtower/wtclient/client.go | 2 +- watchtower/wtclient/session_queue.go | 2 +- watchtower/wtdb/client_session.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/watchtower/wtclient/client.go b/watchtower/wtclient/client.go index 09bb5484..43c3541a 100644 --- a/watchtower/wtclient/client.go +++ b/watchtower/wtclient/client.go @@ -738,7 +738,7 @@ func (c *TowerClient) taskRejected(task *backupTask, curStatus reserveStatus) { case reserveExhausted: c.stats.sessionExhausted() - log.Debugf("Session %v exhausted, %s queued for next session", + log.Debugf("Session %v exhausted, %v queued for next session", c.sessionQueue.ID(), task.id) // Cache the task that we pulled off, so that we can process it diff --git a/watchtower/wtclient/session_queue.go b/watchtower/wtclient/session_queue.go index a279176a..649bf8fe 100644 --- a/watchtower/wtclient/session_queue.go +++ b/watchtower/wtclient/session_queue.go @@ -199,7 +199,7 @@ func (q *sessionQueue) AcceptTask(task *backupTask) (reserveStatus, bool) { numPending := uint32(q.pendingQueue.Len()) maxUpdates := q.cfg.ClientSession.Policy.MaxUpdates - log.Debugf("SessionQueue(%x) deciding to accept %v seqnum=%d "+ + log.Debugf("SessionQueue(%s) deciding to accept %v seqnum=%d "+ "pending=%d max-updates=%d", q.ID(), task.id, q.seqNum, numPending, maxUpdates) diff --git a/watchtower/wtdb/client_session.go b/watchtower/wtdb/client_session.go index e1fd564b..2c455894 100644 --- a/watchtower/wtdb/client_session.go +++ b/watchtower/wtdb/client_session.go @@ -162,7 +162,7 @@ func (b *BackupID) Decode(r io.Reader) error { } // String returns a human-readable encoding of a BackupID. -func (b *BackupID) String() string { +func (b BackupID) String() string { return fmt.Sprintf("backup(%x, %d)", b.ChanID, b.CommitHeight) }