summaryrefslogtreecommitdiffhomepage
path: root/table/policy.go
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2016-01-06 14:36:30 +0900
committerISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2016-01-06 14:53:42 +0900
commit093ea72359442abad958a7d3cf8d731e7c8749ec (patch)
tree662019b8c271ffaf0d0515be729b39bc29fe71ec /table/policy.go
parent43610ebc6c977141b93a185e87fe5c5f8de2553e (diff)
policy: remove heavy debug msg
Sprintf() to stringify Fields is heavy Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'table/policy.go')
-rw-r--r--table/policy.go72
1 files changed, 0 insertions, 72 deletions
diff --git a/table/policy.go b/table/policy.go
index 7148b764..83c8f882 100644
--- a/table/policy.go
+++ b/table/policy.go
@@ -1073,13 +1073,6 @@ func (c *PrefixCondition) Evaluate(path *Path) bool {
result = !result
}
- log.WithFields(log.Fields{
- "Topic": "Policy",
- "Condition": "prefix",
- "Path": path,
- "Matched": result,
- }).Debug("evaluation result")
-
return result
}
@@ -1169,13 +1162,6 @@ func (c *NeighborCondition) Evaluate(path *Path) bool {
result = !result
}
- log.WithFields(log.Fields{
- "Topic": "Policy",
- "Condition": "neighbor",
- "NeighborAddress": path.Owner,
- "Matched": result,
- }).Debug("evaluation result")
-
return result
}
@@ -1274,12 +1260,6 @@ func (c *AsPathCondition) Evaluate(path *Path) bool {
if c.option == MATCH_OPTION_INVERT {
result = !result
}
- log.WithFields(log.Fields{
- "Topic": "Policy",
- "Condition": "aspath",
- "MatchOption": c.option,
- "Matched": result,
- }).Debug("evaluation result")
return result
}
@@ -1365,12 +1345,6 @@ func (c *CommunityCondition) Evaluate(path *Path) bool {
if c.option == MATCH_OPTION_INVERT {
result = !result
}
- log.WithFields(log.Fields{
- "Topic": "Policy",
- "Condition": "community",
- "MatchOption": c.option,
- "Matched": result,
- }).Debug("evaluation result")
return result
}
@@ -1461,13 +1435,6 @@ func (c *ExtCommunityCondition) Evaluate(path *Path) bool {
if c.option == MATCH_OPTION_INVERT {
result = !result
}
-
- log.WithFields(log.Fields{
- "Topic": "Policy",
- "Condition": "community",
- "MatchOption": c.option,
- "Matched": result,
- }).Debug("evaluation result")
return result
}
@@ -1532,13 +1499,6 @@ func (c *AsPathLengthCondition) Evaluate(path *Path) bool {
result = c.length >= length
}
- log.WithFields(log.Fields{
- "Topic": "Policy",
- "Condition": "aspath length",
- "Reason": c.operator,
- "Matched": result,
- }).Debug("evaluation result")
-
return result
}
@@ -1732,12 +1692,6 @@ func (a *CommunityAction) Apply(path *Path) *Path {
case config.BGP_SET_COMMUNITY_OPTION_TYPE_REPLACE:
path.SetCommunities(a.list, true)
}
- log.WithFields(log.Fields{
- "Topic": "Policy",
- "Action": "community",
- "Values": a.list,
- "Method": a.action,
- }).Debug("community action applied")
return path
}
@@ -1978,15 +1932,7 @@ func (a *MedAction) Apply(path *Path) *Path {
"Topic": "Policy",
"Type": "Med Action",
}).Warn(err)
- } else {
- log.WithFields(log.Fields{
- "Topic": "Policy",
- "Action": "med",
- "Value": a.value,
- "ActionType": a.action,
- }).Debug("med action applied")
}
-
return path
}
@@ -2057,25 +2003,12 @@ func (a *AsPathPrependAction) Apply(path *Path) *Path {
}).Warnf("left-most ASN is not seq")
return path
}
- log.WithFields(log.Fields{
- "Topic": "Policy",
- "Type": "AsPathPrepend Action",
- "LastAs": asn,
- "Repeat": a.repeat,
- }).Debug("use left-most ASN")
} else {
asn = a.asn
}
path.PrependAsn(asn, a.repeat)
- log.WithFields(log.Fields{
- "Topic": "Policy",
- "Action": "aspath prepend",
- "ASN": asn,
- "Repeat": a.repeat,
- }).Debug("aspath prepend action applied")
-
return path
}
@@ -2141,11 +2074,6 @@ func (s *Statement) Evaluate(p *Path) bool {
func (s *Statement) Apply(path *Path) (RouteType, *Path) {
result := s.Evaluate(path)
- log.WithFields(log.Fields{
- "Topic": "Policy",
- "Path": path,
- "PolicyName": s.Name,
- }).Debug("statement evaluate : ", result)
if result {
if len(s.ModActions) != 0 {
// apply all modification actions