Skip to content
Snippets Groups Projects
Commit e2bf1ede authored by Christoph Petrausch's avatar Christoph Petrausch
Browse files

Added logging to locRib

parent 06042b9c
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,7 @@ import (
"github.com/bio-routing/bio-rd/net"
"github.com/bio-routing/bio-rd/route"
"github.com/bio-routing/bio-rd/routingtable"
"github.com/sirupsen/logrus"
)
// LocRIB represents a routing information base
......@@ -44,6 +45,10 @@ func (a *LocRIB) AddPath(pfx net.Prefix, p *route.Path) error {
a.mu.Lock()
defer a.mu.Unlock()
logrus.WithFields(map[string]interface{}{
"Prefix": pfx,
"Route": p,
}).Debug("AddPath to locRIB")
routeExisted := false
oldRoute := &route.Route{}
r := a.rt.Get(pfx)
......@@ -70,6 +75,10 @@ func (a *LocRIB) RemovePath(pfx net.Prefix, p *route.Path) bool {
a.mu.Lock()
defer a.mu.Unlock()
logrus.WithFields(map[string]interface{}{
"Prefix": pfx,
"Route": p,
}).Debug("Remove from locRIB")
var oldRoute *route.Route
r := a.rt.Get(pfx)
if r != nil {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment