优化logger设置获取流程
This commit is contained in:
1 parent
0ecf56cd8c
commit
6fb7da87a3
2 files changed
+4
-2
No files matched your search
@@ -2,6 +2,7 @@ package router
|
||||
|
||||
import (
|
||||
"github.com/go-admin-team/go-admin-core/sdk"
|
||||
"github.com/go-admin-team/go-admin-core/sdk/api"
|
||||
"github.com/go-admin-team/go-admin-core/sdk/pkg"
|
||||
"os"
|
||||
|
||||
@@ -35,7 +36,8 @@ func InitRouter() {
|
||||
}
|
||||
|
||||
r.Use(common.Sentinel()).
|
||||
Use(common.RequestId(pkg.TrafficKey))
|
||||
Use(common.RequestId(pkg.TrafficKey)).
|
||||
Use(api.SetRequestLogger)
|
||||
middleware.InitMiddleware(r)
|
||||
// the jwt middleware
|
||||
authMiddleware, err := middleware.AuthInit()
|
||||
|
||||
@@ -8,7 +8,7 @@ require (
|
||||
github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20190307165228-86c17b95fcd5
|
||||
github.com/casbin/casbin/v2 v2.25.1
|
||||
github.com/gin-gonic/gin v1.6.3
|
||||
github.com/go-admin-team/go-admin-core v1.3.0-rc.0.0.20210317043714-3dd2b8cbf8cc
|
||||
github.com/go-admin-team/go-admin-core v1.3.1-0.20210324084642-7c164d76fc11
|
||||
github.com/google/uuid v1.2.0
|
||||
github.com/mojocn/base64Captcha v1.3.1
|
||||
github.com/mssola/user_agent v0.5.2
|
||||
|
||||
Reference in new issue
Block a user