diff --git a/CHANGELOG.md b/CHANGELOG.md index 1181cc50..cdab958b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -303,6 +303,14 @@ read any of them: ### 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 manifest id (`weather` in `ledmatrix-weather/`) no longer deletes it when the install then fails. The safety copy was taken of `weather/`, which did diff --git a/src/display_controller.py b/src/display_controller.py index dee04f21..e8704d29 100644 --- a/src/display_controller.py +++ b/src/display_controller.py @@ -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