diff --git a/src/discussions.py b/src/discussions.py index 25e3036..5e0d449 100644 --- a/src/discussions.py +++ b/src/discussions.py @@ -77,6 +77,7 @@ def fetch_discussions(): for post in request_json: if int(post["id"]) > storage["discussion_id"]: try: + discussion_logger.debug(f"Sending discussion post with ID {post['id']}") parse_discussion_post(post, comment_pages) except ArticleCommentError: return None diff --git a/src/misc.py b/src/misc.py index 38596f1..2466340 100644 --- a/src/misc.py +++ b/src/misc.py @@ -47,6 +47,7 @@ class DataFile: """Data class which instance of is shared by multiple modules to remain consistent and do not cause too many IO operations.""" def __init__(self): self.data = self.load_datafile() + misc_logger.debug("Current contents of data.json {}".format(self.data)) self.changed = False @staticmethod @@ -79,6 +80,7 @@ class DataFile: with open("data.json", "w") as data_file: data_file.write(json.dumps(self.data, indent=4)) self.changed = False + misc_logger.debug("Saving the database succeeded.") except PermissionError: misc_logger.critical("Could not modify a data file (no permissions). No way to store last edit.") sys.exit(1)