Skip to content

Commit

Permalink
fix: add log (#2038)
Browse files Browse the repository at this point in the history
Signed-off-by: 张启航 <[email protected]>
  • Loading branch information
ZhangSetSail authored Nov 19, 2024
1 parent e2b1a14 commit 74f3057
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion api/controller/apigateway/api_gateway_route.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,14 @@ func (g Struct) CreateHTTPAPIRoute(w http.ResponseWriter, r *http.Request) {
routeName = strings.ReplaceAll(routeName, "*", "s-s")

for _, host := range apisixRouteHTTP.Match.Hosts {
logrus.Infof("-------------%v---------------", host)
labels[host] = "host"
labelSelector := host + "=host"
roueList, err := c.ApisixRoutes(tenant.Namespace).List(r.Context(), v1.ListOptions{
LabelSelector: host + "=host",
LabelSelector: labelSelector,
})
logrus.Infof("---------------%v-------------", labelSelector)
logrus.Infof("---------------%v-------------", roueList)
if err != nil {
logrus.Errorf("list check route failure: %v", err)
httputil.ReturnBcodeError(r, w, bcode.ErrRouteNotFound)
Expand Down

0 comments on commit 74f3057

Please sign in to comment.