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)
|
return nil, errors.WithStack(err)
|
||||||
}
|
}
|
||||||
if len(s.Prefix) > 0 {
|
if len(s.Prefix) > 0 {
|
||||||
logger = logger.WithValues("rd_prefix", s.Prefix)
|
logger = logger.WithName("[" + s.Prefix + "]")
|
||||||
}
|
}
|
||||||
c := &rdb{
|
c := &rdb{
|
||||||
orig: orig,
|
orig: orig,
|
||||||
|
@ -175,7 +175,7 @@ func newRedisPool(s RdSettings, logger logr.Logger) *redis.Pool {
|
||||||
|
|
||||||
return c, err
|
return c, err
|
||||||
},
|
},
|
||||||
TestOnBorrow: func(c redis.Conn, t time.Time) error {
|
TestOnBorrow: func(c redis.Conn, _ time.Time) error {
|
||||||
_, err := c.Do("PING")
|
_, err := c.Do("PING")
|
||||||
return err
|
return err
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue