fix recovery
This commit is contained in:
parent
ad95c1be67
commit
f5cc4e4891
|
@ -2,6 +2,7 @@ package httpengine
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
|
"service/library/logger"
|
||||||
"service/library/middleware"
|
"service/library/middleware"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -10,7 +11,7 @@ func NewRouter() *gin.Engine {
|
||||||
|
|
||||||
router := gin.New()
|
router := gin.New()
|
||||||
router.Use(middleware.LoggerMiddleware(gin.LoggerConfig{}))
|
router.Use(middleware.LoggerMiddleware(gin.LoggerConfig{}))
|
||||||
router.Use(middleware.RecoverMiddleware())
|
router.Use(gin.RecoveryWithWriter(logger.Global.Out))
|
||||||
|
|
||||||
return router
|
return router
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue