Browse Source

log control connection errors with debug

Chris Bannister 9 years ago
parent
commit
f221a8dfa4
1 changed files with 4 additions and 0 deletions
  1. 4 0
      control.go

+ 4 - 0
control.go

@@ -299,6 +299,10 @@ func (c *controlConn) query(statement string, values ...interface{}) (iter *Iter
 			return conn.executeQuery(q)
 		})
 
+		if debug && iter.err != nil {
+			log.Printf("control: error executing %q: %v\n", statement, iter.err)
+		}
+
 		q.attempts++
 		if iter.err == nil || !c.retry.Attempt(q) {
 			break