Migrating to unified logger interface

This commit is contained in:
Pavel Shevaev 2022-11-03 17:30:48 +03:00
parent 399ad0a796
commit 5eef4a59f5
1 changed files with 2 additions and 2 deletions

4
rdb.go
View File

@ -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
},