Migrating to unified logger interface

This commit is contained in:
Pavel Shevaev 2022-11-03 17:28:35 +03:00
parent dfef872327
commit a7a7d38702
2 changed files with 3 additions and 4 deletions

5
db.go
View File

@ -73,10 +73,9 @@ func OpenPool(s Settings) *Pool {
}
func GetDBC(p *Pool, logger logr.Logger) *DBC {
if len(p.S.Prefix) > 0 {
logger = logger.WithValues("db_prefix", p.S.Prefix)
}
logger = logger.WithName(p.S.Prefix)
}
con := dbr.NewConnection(p.DB, nil)
sess := con.NewSession(&EventReceiver{logger: logger, s: p.S})

View File

@ -13,7 +13,7 @@ import (
"github.com/go-logr/stdr"
)
const verbosity = 0
const verbosity = 0//2
var logger = stdr.New(log.New(os.Stdout, "", log.Lshortfile))