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