diff options
author | dsp <dsp@2f30.org> | 2016-07-30 14:16:48 +0000 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-07-30 12:17:37 +0900 |
commit | c4fe45902e736a858c4870bcab01c9143551f696 (patch) | |
tree | cbc45786d584fd98c1fb55851f2200bea938c909 /table/policy.go | |
parent | bb15c18402ffcb5beb60aa61cfdc57577633f234 (diff) |
all logging is done with log.WithFields
Signed-off-by: dsp <dsp@2f30.org>
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
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 { |