From 91c39042c80021a3ce03e8f870dd52dc11d2e9b8 Mon Sep 17 00:00:00 2001 From: "A.M. Rowsell" Date: Tue, 9 Jun 2026 18:36:31 -0400 Subject: [PATCH] logging: added some more logging statements --- discorss.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/discorss.py b/discorss.py index 49a7cfd..8513a97 100755 --- a/discorss.py +++ b/discorss.py @@ -164,6 +164,11 @@ class Discorss: ], # "timestamp": str(self.now), } + self.logger.debug( + "Checking for images in post %s from %s...", + latest_post["title"], + hook["name"], + ) image_url = self.get_image_url(latest_post) if image_url is not None: embed["thumbnail"] = {"url": image_url} @@ -303,7 +308,9 @@ class Discorss: match = self.img_src_filter.search(str(text)) if match and self.is_image_url(match.group(1)): image_candidates.append(match.group(1)) - + self.logger.debug("Found the following image candidates in %s...", feed["name"]) + for i in image_candidates: + self.logger.debug("%s", i) if len(image_candidates) > 0: return image_candidates[0] return None @@ -329,7 +336,7 @@ class Discorss: logging.basicConfig( filename=self.log_file_path, encoding="utf-8", - level=logging.WARNING, + level=logging.ERROR, datefmt="%m/%d/%Y %H:%M:%S", format="%(asctime)s [%(threadName)s] -> %(levelname)s: %(message)s", )