diff --git a/http/http.go b/http/http.go index b6504e0..6cfd395 100644 --- a/http/http.go +++ b/http/http.go @@ -11,6 +11,7 @@ import ( _ "gitee.com/red-future---jilin-g/common/consul" "gitee.com/red-future---jilin-g/common/jaeger" + "gitee.com/red-future---jilin-g/common/log/controller" "gitee.com/red-future---jilin-g/common/utils" "github.com/gogf/gf/v2/frame/g" "github.com/gogf/gf/v2/net/ghttp" @@ -46,6 +47,10 @@ func init() { Httpclient.SetDiscovery(gsvc.GetRegistry()) } func RouteRegister(controllers []interface{}) { + Httpserver.Group("/log", func(group *ghttp.RouterGroup) { + group.Middleware(jaeger.NewTracer) + group.Bind(controller.OperationLog) + }) re := regexp.MustCompile("[A-Z]") for _, t := range controllers { sName := reflect.ValueOf(t).Elem().Type().Name()