Skip to content

Commit f2406a6

Browse files
committed
use proper logger
1 parent 8bf1376 commit f2406a6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

export_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func (c *clusterState) IsConsistent(ctx context.Context) bool {
8787
func GetSlavesAddrByName(ctx context.Context, c *SentinelClient, name string) []string {
8888
addrs, err := c.Replicas(ctx, name).Result()
8989
if err != nil {
90-
logging.LoggerWithLevel.Errorf(ctx, "sentinel: Replicas name=%q failed: %s",
90+
logging.LoggerWithLevel().Errorf(ctx, "sentinel: Replicas name=%q failed: %s",
9191
name, err)
9292
return []string{}
9393
}

internal/auth/streaming/pool_hook.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77

88
"github.com/redis/go-redis/v9/internal"
99
"github.com/redis/go-redis/v9/internal/pool"
10+
"github.com/redis/go-redis/v9/logging"
1011
)
1112

1213
// 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,
166167
defer func() {
167168
if rec := recover(); rec != nil {
168169
// once again - safety first
169-
LoggerWrapper.Printf(context.Background(), "panic in reauth worker: %v", rec)
170+
logging.LoggerWithLevel().Errorf(context.Background(), "panic in reauth worker: %v", rec)
170171
}
171172
r.scheduledLock.Lock()
172173
delete(r.scheduledReAuth, connID)

0 commit comments

Comments
 (0)