From 6dd7794d46f8c49e370488b19ed96f7745f74518 Mon Sep 17 00:00:00 2001 From: ChuckBuilds <33324927+ChuckBuilds@users.noreply.github.com> Date: Wed, 23 Apr 2025 14:34:53 -0500 Subject: [PATCH] fix: reduce font change logging spam by only logging when font actually changes --- src/display_manager.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/display_manager.py b/src/display_manager.py index 92ad57eb..9267c2c8 100644 --- a/src/display_manager.py +++ b/src/display_manager.py @@ -192,10 +192,14 @@ class DisplayManager: # Select font based on parameters if font: current_font = font - logger.debug(f"Using custom font: {font}") + if not hasattr(self, '_last_font') or self._last_font != font: + logger.debug(f"Using custom font: {font}") + self._last_font = font else: current_font = self.small_font if small_font else self.regular_font - logger.debug(f"Using {'small' if small_font else 'regular'} font: {current_font}") + if not hasattr(self, '_last_font') or self._last_font != current_font: + logger.debug(f"Using {'small' if small_font else 'regular'} font: {current_font}") + self._last_font = current_font # Calculate x position if not provided (center text) if x is None: