From 1d8c71e22b9c974db66ff41cba81ae601ea14dd7 Mon Sep 17 00:00:00 2001 From: ISHIDA Wataru Date: Tue, 25 Aug 2015 11:29:24 +0900 Subject: *: better log msg Signed-off-by: ISHIDA Wataru --- table/destination.go | 9 +++++---- table/table.go | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'table') diff --git a/table/destination.go b/table/destination.go index 96979a78..290830a4 100644 --- a/table/destination.go +++ b/table/destination.go @@ -251,15 +251,16 @@ func (dest *Destination) Calculate() (*Path, string, error) { //""" func (dest *Destination) removeWithdrawals() { + // If we have no withdrawals, we have nothing to do. + if len(dest.withdrawList) == 0 { + return + } + log.WithFields(log.Fields{ "Topic": "Table", "Key": dest.GetNlri().String(), "Length": len(dest.withdrawList), }).Debug("Removing withdrawals") - // If we have no withdrawals, we have nothing to do. - if len(dest.withdrawList) == 0 { - return - } // If we have some withdrawals and no know-paths, it means it is safe to // delete these withdraws. diff --git a/table/table.go b/table/table.go index 0d6abd29..d40ac9c4 100644 --- a/table/table.go +++ b/table/table.go @@ -182,8 +182,8 @@ func (t *Table) getOrCreateDest(nlri bgp.AddrPrefixInterface) *Destination { if dest == nil { log.WithFields(log.Fields{ "Topic": "Table", - "Key": t.routeFamily, - }).Debugf("create Destination with key %s", tableKey) + "Key": tableKey, + }).Debugf("create Destination") dest = NewDestination(nlri) t.setDestination(tableKey, dest) } -- cgit v1.2.3