diff --git a/db.go b/db.go index c5b1b01..d0f6200 100644 --- a/db.go +++ b/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}) diff --git a/db_test.go b/db_test.go index 0b52364..7697428 100644 --- a/db_test.go +++ b/db_test.go @@ -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))