From efbce3700c24ece5b31c217eb7a207ab70715405 Mon Sep 17 00:00:00 2001 From: Bryan Jones Date: Fri, 1 Nov 2024 23:41:38 -0400 Subject: [PATCH] fix logging --- README.md | 1 - main.py | 7 ++++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3fc0645..b2d1895 100644 --- a/README.md +++ b/README.md @@ -53,4 +53,3 @@ docker run --rm -p 7979:7979 \ -e PLEX_ANIME_LIBRARY="" \ ghcr.io/chkpwd/sofe:latest ``` -[ diff --git a/main.py b/main.py index 7226e19..44a8223 100644 --- a/main.py +++ b/main.py @@ -1,3 +1,4 @@ +import json import logging @@ -8,9 +9,9 @@ logger = logging.getLogger(__name__) -logging.basicConfig(level=logger.level, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s") +logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s") -if USER_CONFIG.debug: +if USER_CONFIG.debug is True: logger.setLevel("DEBUG") @@ -41,7 +42,7 @@ def main(): if USER_CONFIG.create_plex_collection is True: create_plex_collection(collection_items=episodes_in_season_episode_format) - logger.debug(f"Non-Filler Episodes: {nonfillers_episodes}") + logger.debug(f"Non-Filler Episodes: {json.dumps(nonfillers_episodes, indent=4)}") if nonfillers_episodes and USER_CONFIG.monitor_non_filler_sonarr_episodes is True: configure_monitoring(monitored_list=episodes_to_monitor)