Skip to content

Commit

Permalink
Update helper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
giga-a authored Sep 24, 2024
1 parent ef013d7 commit 5d995ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions honeypots/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def setup_logger(name: str, temp_name: str, config: str | None, drop: bool = Fal

ret_logs_obj = getLogger(temp_name)
ret_logs_obj.setLevel(DEBUG)
if "db_postgres" in logs or "db_sqlite" in logs:
if "db_postgres_removed" in logs or "db_sqlite" in logs:
ret_logs_obj.addHandler(CustomHandler(temp_name, logs, custom_filter, config_data, drop))
elif "terminal" in logs:
ret_logs_obj.addHandler(CustomHandler(temp_name, logs, custom_filter))
Expand Down Expand Up @@ -268,7 +268,7 @@ def __init__( # noqa: PLR0913

def emit(self, record: LogRecord): # noqa: C901,PLR0912
try:
if "db_postgres" in self.logs and self.db["db_postgres"]:
if "db_postgres_removed" in self.logs and self.db["db_postgres"]:
if isinstance(record.msg, list):
if record.msg[0] in {"sniffer", "errors"}:
self.db["db_postgres"].insert_into_data_safe(
Expand Down

0 comments on commit 5d995ac

Please sign in to comment.