Migrating to WithValues(..) instead of WithName(..) for config prefix
This commit is contained in:
parent
90d54017d8
commit
c3e281b7ef
2
db.go
2
db.go
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue