mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-10-04 14:25:08 +00:00
fix(display): routine rotation log lines are DEBUG (30% fewer journal lines) (#693)
"Processing mode", "display() returned False" and "No content to display" repeated what "Switching to mode" already logs on every rotation; they are now DEBUG. On ledpi this cut the display's journal lines by about 30%; the measured SD-write saving is small (within noise). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2495,7 +2495,11 @@ class DisplayController:
|
||||
|
||||
manager_to_display = None
|
||||
|
||||
logger.info("Processing mode: %s (%d available)", active_mode, len(self.available_modes))
|
||||
# DEBUG, not INFO: "Switching to mode" already logged this mode. Every
|
||||
# routine rotation line lands in the persistent journal, and on an SD
|
||||
# card each one costs far more than its bytes: measured on ledpi, about
|
||||
# 9 KB of card writes per stored line.
|
||||
logger.debug("Processing mode: %s (%d available)", active_mode, len(self.available_modes))
|
||||
logger.debug("Loaded plugin modes: %s", list(self.plugin_modes.keys()))
|
||||
|
||||
# Handle plugin-based display modes
|
||||
@@ -2623,7 +2627,7 @@ class DisplayController:
|
||||
if isinstance(result, bool):
|
||||
display_result = result
|
||||
if not display_result:
|
||||
logger.info("Plugin %s display() returned False for mode %s", plugin_id, active_mode)
|
||||
logger.debug("Plugin %s display() returned False for mode %s", plugin_id, active_mode)
|
||||
|
||||
# Record success only when display() actually ran this
|
||||
# frame -- a skipped frame (lock busy) held the last
|
||||
@@ -2664,7 +2668,8 @@ class DisplayController:
|
||||
self._advance_on_demand()
|
||||
continue
|
||||
else:
|
||||
logger.info("No content to display for %s, skipping to next mode", active_mode)
|
||||
# Routine (no live game right now): DEBUG, see "Processing mode" above.
|
||||
logger.debug("No content to display for %s, skipping to next mode", active_mode)
|
||||
# Don't clear display when immediately moving to next mode - this causes black flashes
|
||||
# The next mode will render immediately with force_clear=True, which is sufficient
|
||||
|
||||
|
||||
Reference in New Issue
Block a user