From b68d7606f8577ff68ca82cefd246727c96dc9556 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Thu, 12 Jan 2023 07:20:48 +0000 Subject: [PATCH] Clean up debug statements --- core/lib/rules.py | 5 ----- core/management/commands/processing.py | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/core/lib/rules.py b/core/lib/rules.py index 741ce34..f39a4a0 100644 --- a/core/lib/rules.py +++ b/core/lib/rules.py @@ -37,10 +37,8 @@ def process_rules(data): for rule in all_rules: parsed_rule = rule.parse() if "index" not in parsed_rule: - log.debug("No index specified in rule, skipping") continue if "source" not in parsed_rule: - log.debug("No source specified in rule, skipping") continue rule_index = parsed_rule["index"] rule_source = parsed_rule["source"] @@ -49,10 +47,8 @@ def process_rules(data): if not type(rule_source) == list: rule_source = [rule_source] if index not in rule_index: - log.debug(f"{index} not in {rule_index}") continue if message["src"] not in rule_source: - log.debug(f"{message['src']} not in {rule_source}") continue rule_field_length = len(parsed_rule.keys()) @@ -66,7 +62,6 @@ def process_rules(data): if field in message and message[field] in value: matched_field_number += 1 matched_fields.append(field) - print("Matched field", field, message[field], value) if matched_field_number == rule_field_length - 2: rule_matched(rule, message, matched_fields) diff --git a/core/management/commands/processing.py b/core/management/commands/processing.py index ce3eef6..1b586e5 100644 --- a/core/management/commands/processing.py +++ b/core/management/commands/processing.py @@ -1,5 +1,5 @@ import msgpack -from django.core.management.base import BaseCommand, CommandError +from django.core.management.base import BaseCommand from redis import StrictRedis from core.lib.rules import process_rules