From d2634a4697ba924d5434f2cbe005979c4e29a1f2 Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Fri, 10 May 2024 12:08:53 +0200 Subject: [PATCH] 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 --- intelmq/bots/experts/filter/expert.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/intelmq/bots/experts/filter/expert.py b/intelmq/bots/experts/filter/expert.py index 68efac56f..22fa8f21b 100644 --- a/intelmq/bots/experts/filter/expert.py +++ b/intelmq/bots/experts/filter/expert.py @@ -148,10 +148,12 @@ def doFilter(self, event, key, condition): return self.equalsFilter(event, key, condition) def equalsFilter(self, event, key, value): + self.logger.debug('Equality check: %r (event value) == %r (filter value).', event.get(key), value) return (key in event and event.get(key) == value) def regexSearchFilter(self, event, key): + self.logger.debug('Regex filter: Matching %r against %r.', str(event.get(key)), self.filter_value) if key in event: return self.regex.search(str(event.get(key))) else: