Refs style changes and logging fixes
@@ -25,7 +25,6 @@ class AutoLearnThreshold(pad.plugins.base.BasePlugin):
Exclude all tests flagged with noautolearn, userconf or have a 0 score
"""
for name, rule in tests.items():
- self.ctxt.log.debug(name)
if not rule.score:
continue
tflags = rule.tflags or []
@@ -60,7 +59,7 @@ class AutoLearnThreshold(pad.plugins.base.BasePlugin):
return False
if body_points < self['min_body_points']:
self.ctxt.log.debug("not learning, body score: %s < %s",
- header_points, self['min_body_points'])
+ body_points, self['min_body_points'])
return False
if learned_points < LEARNER_HAM_POINTS:
self.ctxt.log.debug("not learning, learn score: %s < %s",
@@ -76,7 +75,7 @@ class AutoLearnThreshold(pad.plugins.base.BasePlugin):
learned_points, LEARNER_SPAM_POINTS)
return False
if msg.score >= self.ctxt.conf['required_score']:
- self.ctxt.log.debug("not learning, msg score: %s > %s",
+ self.ctxt.log.debug("not learning, msg score: %s >= %s",
msg.score, self.ctxt.conf['required_score'])
return False
else:
