Migrating to unified logger interface
This commit is contained in:
parent
dfef872327
commit
a7a7d38702
5
db.go
5
db.go
|
@ -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})
|
||||
|
|
|
@ -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))
|
||||
|
||||
|
|
Loading…
Reference in New Issue