summaryrefslogtreecommitdiffstats
path: root/models/models.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/models.go')
-rw-r--r--models/models.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/models/models.go b/models/models.go
index 352c07e0c3..c7e58737ed 100644
--- a/models/models.go
+++ b/models/models.go
@@ -15,7 +15,6 @@ import (
"path/filepath"
"strings"
- "code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
// Needed for the MySQL driver
@@ -261,7 +260,7 @@ func NewTestEngine(x *xorm.Engine) (err error) {
}
x.SetMapper(core.GonicMapper{})
- x.SetLogger(log.XORMLogger)
+ x.SetLogger(NewXORMLogger(!setting.ProdMode))
x.ShowSQL(!setting.ProdMode)
return x.StoreEngine("InnoDB").Sync2(tables...)
}
@@ -276,7 +275,7 @@ func SetEngine() (err error) {
x.SetMapper(core.GonicMapper{})
// WARNING: for serv command, MUST remove the output to os.stdout,
// so use log file to instead print to stdout.
- x.SetLogger(log.XORMLogger)
+ x.SetLogger(NewXORMLogger(setting.LogSQL))
x.ShowSQL(setting.LogSQL)
return nil
}