Skip to content

Commit

Permalink
add log
Browse files Browse the repository at this point in the history
add log

add log
  • Loading branch information
wuhua3 committed Jan 6, 2025
1 parent 56f8c7b commit 270c023
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cluster/RefersFilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (list RefersFilterConfigList) ParseRefersFilters(clusterURL *motan.URL) Ref
continue
}
rules = append(rules, filter)
vlog.Infof("add refer filter for group: %s, service: %s, rule: %s, mode: %s", clusterURL.Group, clusterURL.Path, filter.Rule, filter.Mode)
vlog.Infof("add refer filter for group: %s, service: %s, rule: %s, mode: %s, filter group: %s, filter service: %s", clusterURL.Group, clusterURL.Path, filter.Rule, filter.Mode, filter.Group, filter.Service)
}
if len(rules) == 0 {
return nil
Expand Down
3 changes: 3 additions & 0 deletions manageHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -944,13 +944,16 @@ func (h *RefersFilterHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
}
err := json.Unmarshal([]byte(configContent), &h.config)
if err != nil {
vlog.Errorf("update refers filter fail, config: %s", configContent)
JSONError(w, "parse config failed")
return
}
err = h.config.Verify()
if err != nil {
vlog.Errorf("update refers filter fail, config: %s", configContent)
JSONError(w, err.Error())
}
vlog.Infof("update refers filter success, config: %s", configContent)
h.agent.clusterMap.Range(func(k, v interface{}) bool {
cls, ok := v.(*cluster.MotanCluster)
if !ok {
Expand Down

0 comments on commit 270c023

Please sign in to comment.