mirror of
https://github.com/redis/go-redis.git
synced 2025-12-02 06:22:31 +03:00
use proper logger
This commit is contained in:
@@ -87,7 +87,7 @@ func (c *clusterState) IsConsistent(ctx context.Context) bool {
|
||||
func GetSlavesAddrByName(ctx context.Context, c *SentinelClient, name string) []string {
|
||||
addrs, err := c.Replicas(ctx, name).Result()
|
||||
if err != nil {
|
||||
logging.LoggerWithLevel.Errorf(ctx, "sentinel: Replicas name=%q failed: %s",
|
||||
logging.LoggerWithLevel().Errorf(ctx, "sentinel: Replicas name=%q failed: %s",
|
||||
name, err)
|
||||
return []string{}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
|
||||
"github.com/redis/go-redis/v9/internal"
|
||||
"github.com/redis/go-redis/v9/internal/pool"
|
||||
"github.com/redis/go-redis/v9/logging"
|
||||
)
|
||||
|
||||
// ReAuthPoolHook is a pool hook that manages background re-authentication of connections
|
||||
@@ -166,7 +167,7 @@ func (r *ReAuthPoolHook) OnPut(_ context.Context, conn *pool.Conn) (bool, bool,
|
||||
defer func() {
|
||||
if rec := recover(); rec != nil {
|
||||
// once again - safety first
|
||||
LoggerWrapper.Printf(context.Background(), "panic in reauth worker: %v", rec)
|
||||
logging.LoggerWithLevel().Errorf(context.Background(), "panic in reauth worker: %v", rec)
|
||||
}
|
||||
r.scheduledLock.Lock()
|
||||
delete(r.scheduledReAuth, connID)
|
||||
|
||||
Reference in New Issue
Block a user