fix: keep MQTT transport logs off the observer CLI console

The esp-tls/MQTT_CLIENT transport errors that a failing or flapping broker
connect produces were printed on the same serial console as the CLI, burying
replies (and confusing any automation reading them). Silence the MQTT client
and PsychicMqttClient log tags; connection state is already visible via the
mqtt* CLI and status feed.
This commit is contained in:
Jason Huebert committed 2026-10-17 09:46:45 -05:00
1 parent 8d58346b23
commit 783874b130
1 file changed
+5
+5
View File
@@ -151,6 +151,11 @@ void MQTTObserver::begin(FILESYSTEM* fs, mesh::LocalIdentity* identity, const ch
_fs = fs;
_identity = identity;
_origin_source = origin;
// The broker and the feed only need the connection state, not the library's
// transport logs; keep them off the shared CLI console.
esp_log_level_set("MQTT_CLIENT", ESP_LOG_NONE);
esp_log_level_set("esp-tls", ESP_LOG_NONE);
esp_log_level_set("\xf0\x9f\x90\x99", ESP_LOG_NONE); // PsychicMqttClient's tag
#if defined(BOARD_HAS_PSRAM)
if (psramFound()) mbedtls_platform_set_calloc_free(observerMbedtlsCalloc, observerMbedtlsFree);
#endif