1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-12-24 10:07:04 +02:00

Update log statement

This commit is contained in:
Milos Gajdos 2019-09-26 12:07:26 +01:00
parent 77f3e7ef48
commit b2577e6022
No known key found for this signature in database
GPG Key ID: 8B31058CC55DFD4F

View File

@ -668,6 +668,8 @@ func (r *router) Process(a *Advert) error {
return events[i].Timestamp.Before(events[j].Timestamp)
})
log.Debugf("Router %s processing advert from: %s", r.options.Id, a.Id)
for _, event := range events {
// skip if the router is the origin of this route
if event.Route.Router == r.options.Id {
@ -677,7 +679,7 @@ func (r *router) Process(a *Advert) error {
// create a copy of the route
route := event.Route
action := event.Type
log.Debugf("Router %s processing route action %s for: %s", r.options.Id, action, route.Address)
log.Debugf("Router %s applying %s from router %s for address: %s", r.options.Id, action, route.Router, route.Address)
if err := r.manageRoute(route, fmt.Sprintf("%s", action)); err != nil {
return fmt.Errorf("failed applying action %s to routing table: %s", action, err)
}