BREAKING CHANGE: V2 of thr SDK #12
@ -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 {
|
||||
fenpaws marked this conversation as resolved
Outdated
|
||||
return err
|
||||
|
Reference in New Issue
Block a user
Set this LogLevel depending on DEBUG or not in config