From d8f221cb562ff1bc2c9fff472b133ae3e1ab6ea4 Mon Sep 17 00:00:00 2001 From: ChuckBuilds <33324927+ChuckBuilds@users.noreply.github.com> Date: Fri, 18 Apr 2025 12:44:06 -0500 Subject: [PATCH] Added debug logging to track NHL display execution path and manager selection --- src/display_controller.py | 3 +++ src/nhl_managers.py | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/display_controller.py b/src/display_controller.py index 903898a2..42cf9d0c 100644 --- a/src/display_controller.py +++ b/src/display_controller.py @@ -145,10 +145,13 @@ class DisplayController: self.stocks.display_stocks(force_clear=self.force_clear) elif self.current_display_mode == 'nhl_live' and self.nhl_live: + logger.info("Calling NHLLiveManager.display()") self.nhl_live.display(force_clear=self.force_clear) elif self.current_display_mode == 'nhl_recent' and self.nhl_recent: + logger.info("Calling NHLRecentManager.display()") self.nhl_recent.display(force_clear=self.force_clear) elif self.current_display_mode == 'nhl_upcoming' and self.nhl_upcoming: + logger.info("Calling NHLUpcomingManager.display()") self.nhl_upcoming.display(force_clear=self.force_clear) elif self.current_display_mode == 'stock_news' and self.news: diff --git a/src/nhl_managers.py b/src/nhl_managers.py index 26fd9d80..a4661c84 100644 --- a/src/nhl_managers.py +++ b/src/nhl_managers.py @@ -218,6 +218,7 @@ class BaseNHLManager: def display(self, force_clear: bool = False) -> None: """Common display method for all NHL managers""" + self.logger.info(f"BaseNHLManager.display() called with force_clear={force_clear}") if not self.current_game: current_time = time.time() if not hasattr(self, '_last_warning_time'): @@ -441,6 +442,7 @@ class NHLLiveManager(BaseNHLManager): def display(self, force_clear: bool = False): """Display live game information.""" + self.logger.info("NHLLiveManager.display() called") if not self.current_game: logging.warning("[NHL] No game data available to display") return @@ -594,6 +596,7 @@ class NHLRecentManager(BaseNHLManager): def display(self, force_clear: bool = False): """Display recent game information.""" + self.logger.info("NHLRecentManager.display() called") if not self.current_game: logging.warning("[NHL] No recent game data available to display") return @@ -741,6 +744,7 @@ class NHLUpcomingManager(BaseNHLManager): def display(self, force_clear: bool = False): """Display upcoming game information.""" + self.logger.info("NHLUpcomingManager.display() called") if not self.current_game: logging.warning("[NHL] No upcoming game data available to display") return