作者 yangfu

日志配置修改

@@ -9,8 +9,8 @@ import ( @@ -9,8 +9,8 @@ import (
9 9
10 "github.com/beego/beego/v2/server/web" 10 "github.com/beego/beego/v2/server/web"
11 "github.com/linmadan/egglib-go/web/beego/filters" 11 "github.com/linmadan/egglib-go/web/beego/filters"
12 -  
13 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" 12 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log"
  13 + _ "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log"
14 _ "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego/routers" 14 _ "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego/routers"
15 ) 15 )
16 16
@@ -34,7 +34,7 @@ func init() { @@ -34,7 +34,7 @@ func init() {
34 web.InsertFilter("/*", web.BeforeRouter, filters.AllowCors()) 34 web.InsertFilter("/*", web.BeforeRouter, filters.AllowCors())
35 web.InsertFilter("/*", web.BeforeExec, filters.CreateRequstLogFilter(log.Logger)) 35 web.InsertFilter("/*", web.BeforeExec, filters.CreateRequstLogFilter(log.Logger))
36 web.InsertFilter("/*", web.AfterExec, filters.CreateResponseLogFilter(log.Logger), web.WithReturnOnOutput(false)) 36 web.InsertFilter("/*", web.AfterExec, filters.CreateResponseLogFilter(log.Logger), web.WithReturnOnOutput(false))
37 - web.InsertFilter("/v1/app1/*", web.BeforeExec, filters.SecureHandler( 37 + web.InsertFilter("/v1/app/*", web.BeforeExec, filters.SecureHandler(
38 filters.WithEnableCheckTimestamp(false), 38 filters.WithEnableCheckTimestamp(false),
39 filters.WithOnInvalidRequest(func(ctx *context.Context) { 39 filters.WithOnInvalidRequest(func(ctx *context.Context) {
40 headerData, _ := json.Marshal(ctx.Input.Context.Request.Header) 40 headerData, _ := json.Marshal(ctx.Input.Context.Request.Header)