开启日志功能

This commit is contained in:
pixel
2019-11-01 13:56:40 +08:00
parent 03ab9f6f92
commit 27ee856e31
3 changed files with 25 additions and 5 deletions

View File

@@ -23,7 +23,7 @@ func main() {
registTable.RegistTable(qmsql.InitMysql(config.Dbconfig.Admin))
defer qmsql.DEFAULTDB.Close()
Router := initRouter.InitRouter()
//qmlog.QMLog.Info("服务器开启") // 日志测试代码
qmlog.QMLog.Info("服务器开启") // 日志测试代码
s := &http.Server{
Addr: ":8888",
@@ -32,16 +32,16 @@ func main() {
WriteTimeout: 10 * time.Second,
MaxHeaderBytes: 1 << 20,
}
time.Sleep(10*time.Microsecond)
time.Sleep(10 * time.Microsecond)
fmt.Printf(`欢迎使用 Gin-Vue-Admin
作者:奇淼 And Spike666
微信shouzi_1994
默认自动化文档地址:http://127.0.0.1%s/swagger/index.html
默认前端文件运行地址:http://127.0.0.1:8080
`,s.Addr)
`, s.Addr)
_ = s.ListenAndServe()
}
func run(server *http.Server){
func run(server *http.Server) {
}
}