refactor: update logging configuration to INFO level and enhance font logging

This commit is contained in:
ChuckBuilds
2025-04-23 15:43:05 -05:00
parent 3f4b1ec4fc
commit 537def7d37
2 changed files with 9 additions and 4 deletions

View File

@@ -16,7 +16,7 @@ import time
# Configure logger for this module # Configure logger for this module
logger = logging.getLogger(__name__) 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: class CalendarManager:
def __init__(self, display_manager, config): def __init__(self, display_manager, config):
@@ -33,9 +33,13 @@ class CalendarManager:
self.events = [] self.events = []
self.service = None self.service = None
# Log font information during initialization only # Log font information during initialization
if self.enabled: logger.info(f"Display Manager fonts:")
logger.info(f"Calendar configuration: enabled={self.enabled}, update_interval={self.update_interval}, max_events={self.max_events}, calendars={self.calendars}") 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 # Get timezone from config
self.config_manager = ConfigManager() self.config_manager = ConfigManager()

View File

@@ -10,6 +10,7 @@ import freetype
# Get logger without configuring # Get logger without configuring
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO) # Set to INFO level
class DisplayManager: class DisplayManager:
_instance = None _instance = None