From 65acd04e1a4f23e2064077b62031b8a84d53947e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=96=8C?= <259278618@qq.com> Date: Tue, 30 Dec 2025 18:27:09 +0800 Subject: [PATCH] =?UTF-8?q?http=E5=B7=A5=E5=85=B7=E5=8C=85=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E6=B3=A8=E5=86=8Clog=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- http/http.go | 5 +++++ 1 file changed, 5 insertions(+) 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()