Migrating to WithValues(..) instead of WithName(..) for config prefix

This commit is contained in:
Pavel Shevaev 2022-11-08 16:53:49 +03:00
parent 90d54017d8
commit c3e281b7ef
1 changed files with 1 additions and 1 deletions

2
db.go
View File

@ -74,7 +74,7 @@ func OpenPool(s Settings) *Pool {
func GetDBC(p *Pool, logger logr.Logger) *DBC { func GetDBC(p *Pool, logger logr.Logger) *DBC {
if len(p.S.Prefix) > 0 { if len(p.S.Prefix) > 0 {
logger = logger.WithName(p.S.Prefix) logger = logger.WithValues("db", p.S.Prefix)
} }
con := dbr.NewConnection(p.DB, nil) con := dbr.NewConnection(p.DB, nil)