Commit 3a91de73 by mushishixian

关闭日志

parent 2b941947
......@@ -41,6 +41,14 @@ func initArgs() {
func initDB() {
dsn := util.Configs.Liexin_databases.Dns
engine, err = gorose.Open(&gorose.Config{Driver: "mysql", Dsn: dsn})
engine.Use(func(eg *gorose.Engin) {
eg.SetLogger(gorose.NewLogger(&gorose.LogOption{
FilePath: "./log",
EnableSqlLog: false,
EnableSlowLog: 5,
EnableErrorLog: false,
}))
})
if err != nil {
panic(err)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment