xyxie há 1 ano atrás
pai
commit
0c7876f61a
1 ficheiros alterados com 2 adições e 0 exclusões
  1. 2 0
      models/db.go

+ 2 - 0
models/db.go

@@ -24,6 +24,8 @@ func init() {
 	etaDb, _ := orm.GetDB("eta")
 	etaDb.SetConnMaxLifetime(10 * time.Minute)
 
+	orm.Debug = true
+	orm.DebugLog = orm.NewLog(utils.Binlog)
 	//注册对象
 	orm.RegisterModel(
 		new(Report),