Migrating to unified logger interface
This commit is contained in:
parent
399ad0a796
commit
5eef4a59f5
4
rdb.go
4
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
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue