From 5eef4a59f5756583b0ea818fe39343cf5f3baa49 Mon Sep 17 00:00:00 2001 From: Pavel Shevaev Date: Thu, 3 Nov 2022 17:30:48 +0300 Subject: [PATCH] Migrating to unified logger interface --- rdb.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rdb.go b/rdb.go index 1d64ae8..fca9266 100644 --- a/rdb.go +++ b/rdb.go @@ -150,7 +150,7 @@ func newRedisPool(s RdSettings, logger logr.Logger) *redis.Pool { return nil, errors.WithStack(err) } if len(s.Prefix) > 0 { - logger = logger.WithValues("rd_prefix", s.Prefix) + logger = logger.WithName("[" + s.Prefix + "]") } c := &rdb{ orig: orig, @@ -175,7 +175,7 @@ func newRedisPool(s RdSettings, logger logr.Logger) *redis.Pool { return c, err }, - TestOnBorrow: func(c redis.Conn, t time.Time) error { + TestOnBorrow: func(c redis.Conn, _ time.Time) error { _, err := c.Do("PING") return err },