Adjust log module

This commit is contained in:
Granty1
2020-03-24 13:34:03 +08:00
parent f01d15867e
commit d4a05fce7b
13 changed files with 271 additions and 89 deletions
+6 -2
View File
@@ -3,20 +3,24 @@ package cmd
import (
"fmt"
"gin-vue-admin/config"
"gin-vue-admin/init/log"
"github.com/gin-gonic/gin"
"net/http"
"time"
)
func RunWindowsServer(Router *gin.Engine) {
func RunWindowsServer(Router *gin.Engine, logger log.Logger) {
address := fmt.Sprintf(":%d", config.GinVueAdminconfig.System.Addr)
s := &http.Server{
Addr: fmt.Sprintf(":%d", config.GinVueAdminconfig.System.Addr),
Addr: address,
Handler: Router,
ReadTimeout: 10 * time.Second,
WriteTimeout: 10 * time.Second,
MaxHeaderBytes: 1 << 20,
}
time.Sleep(10 * time.Microsecond)
logger.Debug("server run success on ", address)
fmt.Printf(`欢迎使用 Gin-Vue-Admin
作者:奇淼 And Spike666
微信:shouzi_1994