From 25b96aa4c034200dec8dc714ab99b58305756578 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Berm=C3=BChler?= Date: Fri, 26 Nov 2021 10:29:12 +0100 Subject: [PATCH] Log-messages were logged with the root logger instead of the parsedmarc logger. --- parsedmarc/__init__.py | 2 +- parsedmarc/utils.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/parsedmarc/__init__.py b/parsedmarc/__init__.py index 2750819..712b822 100644 --- a/parsedmarc/__init__.py +++ b/parsedmarc/__init__.py @@ -1420,7 +1420,7 @@ def email_results(results, host, mail_from, mail_to, attachment_filename (str): Override the default attachment filename message (str: Override the default plain text body """ - logging.debug("Emailing report to: {0}".format(",".join(mail_to))) + logger.debug("Emailing report to: {0}".format(",".join(mail_to))) date_string = datetime.now().strftime("%Y-%m-%d") if attachment_filename: if not attachment_filename.lower().endswith(".zip"): diff --git a/parsedmarc/utils.py b/parsedmarc/utils.py index 6b5f980..9446726 100644 --- a/parsedmarc/utils.py +++ b/parsedmarc/utils.py @@ -293,10 +293,10 @@ def get_ip_address_country(ip_address): if db_path is None: db_path = os.path.join(tempdir, "GeoLite2-Country.mmdb") if not os.path.exists(db_path): - logging.warning("GeoLite2-Country.mmdb is missing. " - "Please follow the instructions at " - "https://dev.maxmind.com/geoip/geoipupdate/ " - "to get the latest version.") + logger.warning("GeoLite2-Country.mmdb is missing. " + "Please follow the instructions at " + "https://dev.maxmind.com/geoip/geoipupdate/ " + "to get the latest version.") return None else: db_age = datetime.now() - datetime.fromtimestamp(