Skip to content

Commit f3a3573

Browse files
committed
filter expert: add debugging output for comparisons
if users or devs run the bot in DEBUG log level, there was no useful output yet. This change adds two log statements, showing which comparision was made
1 parent 47670d3 commit f3a3573

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

intelmq/bots/experts/filter/expert.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,12 @@ def doFilter(self, event, key, condition):
148148
return self.equalsFilter(event, key, condition)
149149

150150
def equalsFilter(self, event, key, value):
151+
self.logger.debug('Equality check: %r (event value) == %r (filter value).', event.get(key), value)
151152
return (key in event and
152153
event.get(key) == value)
153154

154155
def regexSearchFilter(self, event, key):
156+
self.logger.debug('Regex filter: Matching %r against %r.', str(event.get(key)), self.filter_value)
155157
if key in event:
156158
return self.regex.search(str(event.get(key)))
157159
else:

0 commit comments

Comments
 (0)