Skip to content

Commit

Permalink
rename debug -> gocqlDebug
Browse files Browse the repository at this point in the history
  • Loading branch information
Zariel committed Feb 2, 2016
1 parent c771797 commit cda7096
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion connectionpool.go
Expand Up @@ -459,7 +459,7 @@ func (pool *hostConnPool) logConnectErr(err error) {
if opErr, ok := err.(*net.OpError); ok && (opErr.Op == "dial" || opErr.Op == "read") {
// connection refused
// these are typical during a node outage so avoid log spam.
if debug {
if gocqlDebug {
log.Printf("unable to dial %q: %v\n", pool.host.Peer(), err)
}
} else if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion control.go
Expand Up @@ -299,7 +299,7 @@ func (c *controlConn) query(statement string, values ...interface{}) (iter *Iter
return conn.executeQuery(q)
})

if debug && iter.err != nil {
if gocqlDebug && iter.err != nil {
log.Printf("control: error executing %q: %v\n", statement, iter.err)
}

Expand Down
2 changes: 1 addition & 1 deletion debug_off.go
Expand Up @@ -2,4 +2,4 @@

package gocql

const debug = false
const gocqlDebug = false
2 changes: 1 addition & 1 deletion debug_on.go
Expand Up @@ -2,4 +2,4 @@

package gocql

const debug = true
const gocqlDebug = true
4 changes: 2 additions & 2 deletions events.go
Expand Up @@ -91,7 +91,7 @@ func (s *Session) handleEvent(framer *framer) {
return
}

if debug {
if gocqlDebug {
log.Printf("gocql: handling frame: %v\n", frame)
}

Expand Down Expand Up @@ -140,7 +140,7 @@ func (s *Session) handleNodeEvent(frames []frame) {
}

for _, f := range events {
if debug {
if gocqlDebug {
log.Printf("gocql: dispatching event: %+v\n", f)
}

Expand Down

0 comments on commit cda7096

Please sign in to comment.