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