From 7762ad92f53989986d49b356f31ceca152be1e70 Mon Sep 17 00:00:00 2001 From: jiriks74 Date: Tue, 14 Jan 2025 10:59:18 +0100 Subject: [PATCH] fix(logging): Move some logs from info to debug to avoid spam log `Fetching notifications.` and `No new notifications.` are now under `DEBUG`. --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 8a6fb99..0234b70 100644 --- a/main.py +++ b/main.py @@ -147,7 +147,7 @@ def main(): "Accept": "application/json" } while True: - log.info("Fetching notifications.") + log.debug("Fetching notifications.") response = requests.get(f"{config["nextcloud_base_url"]}{config["nextcloud_notification_path"]}", headers = nextcloud_request_headers) if not response.ok: log.error(f"Error while fetching notifications. Response code: {response.status_code}.") @@ -166,7 +166,7 @@ def main(): for notification in reversed(data["ocs"]["data"]): if datetime.fromisoformat(notification["datetime"]) <= last_datetime: - log.info("No new notifications.") + log.debug("No new notifications.") continue last_datetime = datetime.fromisoformat(notification["datetime"]) log.info("New notifications received.")