refactor(Logging): calibrate default levels and reduce playback noise
Serial default VERBOSE→INFO, MQTT default NONE→WARNING, SD NONE→WARNING. Per-subsystem MQTT caps added in CommunicationRouter: BellEngine/ OutputManager/HealthMonitor/ConfigManager at WARNING to silence per-note and per-poll spam; Player/Telemetry/OTAManager at INFO to keep state transitions visible. Remove early Logging::setLevel() call in main.cpp — CommunicationRouter applies all three channels once the MQTT callback is wired. Loop heartbeat downgraded DEBUG→VERBOSE. HealthMonitor polling noise (skipping/performing lines) removed; subsystem status and completion lines VERBOSE→DEBUG. FirmwareValidator boot-path checks VERBOSE→INFO (one-shot, worth seeing). ConfigManager isHealthy() false-branches and NVS read trace VERBOSE→DEBUG. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+3
-6
@@ -501,10 +501,8 @@ void setup()
|
||||
bootOtaCheck();
|
||||
// ─────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
// Apply log level from config (loaded from SD)
|
||||
uint8_t logLevel = configManager.getGeneralConfig().serialLogLevel;
|
||||
Logging::setLevel((Logging::LogLevel)logLevel);
|
||||
LOG_INFO(TAG, "Log level set to %d from configuration", logLevel);
|
||||
// Log levels are applied by CommunicationRouter::begin() once all three channels
|
||||
// (serial, MQTT, SD) and the MQTT callback are properly configured together.
|
||||
|
||||
inputManager.begin();
|
||||
inputManager.setFactoryResetMediumPressCallback(handleWiFiCredsReset);
|
||||
@@ -818,10 +816,9 @@ void loop()
|
||||
// Process UART command input from external devices (LCD panel, buttons)
|
||||
communication.loop();
|
||||
|
||||
// 🔥 DEBUG: Log every 10 seconds to verify we're still running
|
||||
static unsigned long lastLog = 0;
|
||||
if (millis() - lastLog > 10000) {
|
||||
LOG_DEBUG(TAG, "❤️ Loop alive | Free heap: %d bytes (%.1f KB) | Min free: %d | Largest block: %d",
|
||||
LOG_VERBOSE(TAG, "❤️ Loop alive | Free heap: %d bytes (%.1f KB) | Min free: %d | Largest block: %d",
|
||||
ESP.getFreeHeap(),
|
||||
ESP.getFreeHeap() / 1024.0,
|
||||
ESP.getMinFreeHeap(),
|
||||
|
||||
Reference in New Issue
Block a user