diff options
Diffstat (limited to 'table/policy.go')
-rw-r--r-- | table/policy.go | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/table/policy.go b/table/policy.go index 37aa4355..94773346 100644 --- a/table/policy.go +++ b/table/policy.go @@ -1020,7 +1020,9 @@ func (c *NeighborCondition) Option() MatchOption { func (c *NeighborCondition) Evaluate(path *Path, options *PolicyOptions) bool { if len(c.set.list) == 0 { - log.Debug("NeighborList doesn't have elements") + log.WithFields(log.Fields{ + "Topic": "Policy", + }).Debug("NeighborList doesn't have elements") return true } @@ -1597,7 +1599,8 @@ func (a *MedAction) Apply(path *Path, _ *PolicyOptions) *Path { log.WithFields(log.Fields{ "Topic": "Policy", "Type": "Med Action", - }).Warn(err) + "Error": err, + }).Warn("Could not set Med on path") } return path } @@ -1678,7 +1681,7 @@ func (a *AsPathPrependAction) Apply(path *Path, _ *PolicyOptions) *Path { log.WithFields(log.Fields{ "Topic": "Policy", "Type": "AsPathPrepend Action", - }).Warnf("aspath length is zero.") + }).Warn("aspath length is zero.") return path } asn = aspath[0] @@ -1686,7 +1689,7 @@ func (a *AsPathPrependAction) Apply(path *Path, _ *PolicyOptions) *Path { log.WithFields(log.Fields{ "Topic": "Policy", "Type": "AsPathPrepend Action", - }).Warnf("left-most ASN is not seq") + }).Warn("left-most ASN is not seq") return path } } else { |