mirror of
https://github.com/redis/go-redis.git
synced 2025-07-31 05:04:23 +03:00
Declare and use a package-level Logger
This allow users of the API to override the Logger. Fix #250.
This commit is contained in:
3
ring.go
3
ring.go
@ -3,7 +3,6 @@ package redis
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"log"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
@ -202,7 +201,7 @@ func (ring *Ring) heartbeat() {
|
||||
for _, shard := range ring.shards {
|
||||
err := shard.Client.Ping().Err()
|
||||
if shard.Vote(err == nil || err == errPoolTimeout) {
|
||||
log.Printf("redis: ring shard state changed: %s", shard)
|
||||
Logger.Printf("redis: ring shard state changed: %s", shard)
|
||||
rebalance = true
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user