From 7a0e2261e8864f712bf6f815bd4e90b9e088895a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=AF=E8=88=AA?= <101104760+ZhangSetSail@users.noreply.github.com> Date: Mon, 13 Jan 2025 18:11:51 +0800 Subject: [PATCH] perf: add log MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 张启航 <101104760+ZhangSetSail@users.noreply.github.com> --- api/controller/apigateway/api_gateway_route.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/controller/apigateway/api_gateway_route.go b/api/controller/apigateway/api_gateway_route.go index 054f0baf1..64caf443d 100644 --- a/api/controller/apigateway/api_gateway_route.go +++ b/api/controller/apigateway/api_gateway_route.go @@ -518,6 +518,7 @@ func (g Struct) DeleteTCPRoute(w http.ResponseWriter, r *http.Request) { k := k8s.Default().Clientset.CoreV1() // List services with the specified labels + logrus.Infof("show tenant namespace %v and labelSelector %v", tenant.Namespace, labelSelector) services, err := k.Services(tenant.Namespace).List(r.Context(), v1.ListOptions{ LabelSelector: labelSelector, }) @@ -526,7 +527,7 @@ func (g Struct) DeleteTCPRoute(w http.ResponseWriter, r *http.Request) { httputil.ReturnBcodeError(r, w, bcode.ErrRouteDelete) return } - + logrus.Infof("show service len %v", len(services.Items)) if len(services.Items) == 0 { // No services found with these labels httputil.ReturnSuccess(r, w, name)