mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-10-04 06:15:09 +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:
@@ -303,6 +303,14 @@ read any of them:
|
|||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
|
|
||||||
|
- Quieter routine logging. Every rotation logged each mode twice
|
||||||
|
("Switching to mode", then "Processing mode"), and a mode with nothing to
|
||||||
|
show added "display() returned False" and "No content to display". Those
|
||||||
|
three repeats are now DEBUG; "Switching to mode" stays INFO, and `--debug`
|
||||||
|
shows the rest. On ledpi this cut the display's journal lines by about 30%
|
||||||
|
(~105 to ~75 per 5 minutes). Each stored line costs roughly 9 KB of SD-card
|
||||||
|
writes through the persistent journal (display at INFO vs WARNING: about
|
||||||
|
190 KiB/min apart), so the saving is real but small.
|
||||||
- Reinstalling a plugin by its registry id when it is installed under its
|
- Reinstalling a plugin by its registry id when it is installed under its
|
||||||
manifest id (`weather` in `ledmatrix-weather/`) no longer deletes it when
|
manifest id (`weather` in `ledmatrix-weather/`) no longer deletes it when
|
||||||
the install then fails. The safety copy was taken of `weather/`, which did
|
the install then fails. The safety copy was taken of `weather/`, which did
|
||||||
|
|||||||
@@ -2495,7 +2495,11 @@ class DisplayController:
|
|||||||
|
|
||||||
manager_to_display = None
|
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()))
|
logger.debug("Loaded plugin modes: %s", list(self.plugin_modes.keys()))
|
||||||
|
|
||||||
# Handle plugin-based display modes
|
# Handle plugin-based display modes
|
||||||
@@ -2623,7 +2627,7 @@ class DisplayController:
|
|||||||
if isinstance(result, bool):
|
if isinstance(result, bool):
|
||||||
display_result = result
|
display_result = result
|
||||||
if not display_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
|
# Record success only when display() actually ran this
|
||||||
# frame -- a skipped frame (lock busy) held the last
|
# frame -- a skipped frame (lock busy) held the last
|
||||||
@@ -2664,7 +2668,8 @@ class DisplayController:
|
|||||||
self._advance_on_demand()
|
self._advance_on_demand()
|
||||||
continue
|
continue
|
||||||
else:
|
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
|
# 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
|
# The next mode will render immediately with force_clear=True, which is sufficient
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user