Browse Source

fix install submit crash caused by xorm log (#1119)

Lunny Xiao 3 years ago
parent
commit
7b64b2ddab
1 changed files with 1 additions and 2 deletions
  1. 1 2
      models/models.go

+ 1 - 2
models/models.go

@@ -239,9 +239,8 @@ func NewTestEngine(x *xorm.Engine) (err error) {
239 239
 		return fmt.Errorf("Connect to database: %v", err)
240 240
 	}
241 241
 
242
-	setting.NewXORMLogService(false)
243
-
244 242
 	x.SetMapper(core.GonicMapper{})
243
+	x.SetLogger(log.XORMLogger)
245 244
 	return x.StoreEngine("InnoDB").Sync2(tables...)
246 245
 }
247 246