From fdd209b9a7d7fb0725f4b93a0a6f113b5a2314a4 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 686744581..c716f19fd 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: