diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-12-22 04:33:09 -0800 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-12-22 04:33:09 -0800 |
commit | 6ecf5e15ceda5e8535727d16a3d04e35cb7f51d0 (patch) | |
tree | b69464e974cc00cab9dadd5c1b8a6c66e5cf13b1 /table/path.go | |
parent | d2bbac0697bfdbf6395172163cd0d171bb196246 (diff) |
clean up logger usage
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'table/path.go')
-rw-r--r-- | table/path.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/table/path.go b/table/path.go index b9362bd9..777e17c6 100644 --- a/table/path.go +++ b/table/path.go @@ -17,6 +17,7 @@ package table import ( "fmt" + log "github.com/Sirupsen/logrus" "github.com/osrg/gobgp/packet" "net" "reflect" @@ -56,7 +57,7 @@ type PathDefault struct { func NewPathDefault(rf RouteFamily, source *PeerInfo, nlri bgp.AddrPrefixInterface, sourceVerNum int, nexthop net.IP, isWithdraw bool, pattrs []bgp.PathAttributeInterface, medSetByTargetNeighbor bool) *PathDefault { if !isWithdraw && pattrs == nil { - logger.Error("Need to provide nexthop and patattrs for path that is not a withdraw.") + log.Error("Need to provide nexthop and patattrs for path that is not a withdraw.") return nil } @@ -196,7 +197,7 @@ func (pi *PathDefault) getPrefix() net.IP { func CreatePath(source *PeerInfo, nlri bgp.AddrPrefixInterface, attrs []bgp.PathAttributeInterface, isWithdraw bool) Path { rf := RouteFamily(int(nlri.AFI())<<16 | int(nlri.SAFI())) - logger.Debugf("afi: %d, safi: %d ", int(nlri.AFI()), nlri.SAFI()) + log.Debugf("afi: %d, safi: %d ", int(nlri.AFI()), nlri.SAFI()) var path Path var sourceVerNum int = 1 @@ -206,10 +207,10 @@ func CreatePath(source *PeerInfo, nlri bgp.AddrPrefixInterface, attrs []bgp.Path switch rf { case RF_IPv4_UC: - logger.Debugf("RouteFamily : %s", RF_IPv4_UC.String()) + log.Debugf("RouteFamily : %s", RF_IPv4_UC.String()) path = NewIPv4Path(source, nlri, sourceVerNum, isWithdraw, attrs, false) case RF_IPv6_UC: - logger.Debugf("RouteFamily : %s", RF_IPv6_UC.String()) + log.Debugf("RouteFamily : %s", RF_IPv6_UC.String()) path = NewIPv6Path(source, nlri, sourceVerNum, isWithdraw, attrs, false) } return path |