fix(postgres): Update postgres.go to use silent logger for GORM configuration
Signed-off-by: soxx <soxx@fenpa.ws>
This commit is contained in:
parent
c07fd69f4f
commit
3c17c60439
@ -14,6 +14,7 @@ import (
|
||||
log "github.com/sirupsen/logrus"
|
||||
gormPostgres "gorm.io/driver/postgres"
|
||||
"gorm.io/gorm"
|
||||
logger2 "gorm.io/gorm/logger"
|
||||
)
|
||||
|
||||
//go:embed migrations/*.sql
|
||||
@ -42,7 +43,9 @@ func (p *postgresqlConnection) Connect(_ context.Context, endpoint string, usern
|
||||
|
||||
log.Infof("OtterSpace: migration compleate")
|
||||
|
||||
db, err := gorm.Open(gormPostgres.Open(dsn), &gorm.Config{})
|
||||
db, err := gorm.Open(gormPostgres.Open(dsn), &gorm.Config{
|
||||
Logger: logger2.Default.LogMode(logger2.Silent),
|
||||
})
|
||||
p.db = db
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user