From 537def7d3785b0e174bc0dfa7fd545c9a42422cc Mon Sep 17 00:00:00 2001 From: ChuckBuilds <33324927+ChuckBuilds@users.noreply.github.com> Date: Wed, 23 Apr 2025 15:43:05 -0500 Subject: [PATCH] refactor: update logging configuration to INFO level and enhance font logging --- src/calendar_manager.py | 12 ++++++++---- src/display_manager.py | 1 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/calendar_manager.py b/src/calendar_manager.py index ad3db24a..079da0c3 100644 --- a/src/calendar_manager.py +++ b/src/calendar_manager.py @@ -16,7 +16,7 @@ import time # Configure logger for this module logger = logging.getLogger(__name__) -logger.setLevel(logging.DEBUG) # Set to DEBUG to see font details +logger.setLevel(logging.INFO) # Set to INFO level class CalendarManager: def __init__(self, display_manager, config): @@ -33,9 +33,13 @@ class CalendarManager: self.events = [] self.service = None - # Log font information during initialization only - if self.enabled: - logger.info(f"Calendar configuration: enabled={self.enabled}, update_interval={self.update_interval}, max_events={self.max_events}, calendars={self.calendars}") + # Log font information during initialization + logger.info(f"Display Manager fonts:") + logger.info(f" Small font: {self.display_manager.small_font}") + logger.info(f" Calendar font: {self.display_manager.calendar_font}") + logger.info(f" Font types - Small: {type(self.display_manager.small_font)}, Calendar: {type(self.display_manager.calendar_font)}") + + logger.info(f"Calendar configuration: enabled={self.enabled}, update_interval={self.update_interval}, max_events={self.max_events}, calendars={self.calendars}") # Get timezone from config self.config_manager = ConfigManager() diff --git a/src/display_manager.py b/src/display_manager.py index d62f618b..eb08f066 100644 --- a/src/display_manager.py +++ b/src/display_manager.py @@ -10,6 +10,7 @@ import freetype # Get logger without configuring logger = logging.getLogger(__name__) +logger.setLevel(logging.INFO) # Set to INFO level class DisplayManager: _instance = None