diff --git a/src/SerialConsole.cpp b/src/SerialConsole.cpp index 9a9331e47..d25b81da7 100644 --- a/src/SerialConsole.cpp +++ b/src/SerialConsole.cpp @@ -96,7 +96,7 @@ bool SerialConsole::handleToRadio(const uint8_t *buf, size_t len) void SerialConsole::log_to_serial(const char *logLevel, const char *format, va_list arg) { - if (usingProtobufs) { + if (usingProtobufs && config.device.debug_log_enabled) { meshtastic_LogRecord_Level ll = meshtastic_LogRecord_Level_UNSET; // default to unset switch (logLevel[0]) { case 'D': @@ -120,4 +120,4 @@ void SerialConsole::log_to_serial(const char *logLevel, const char *format, va_l emitLogRecord(ll, thread ? thread->ThreadName.c_str() : "", format, arg); } else RedirectablePrint::log_to_serial(logLevel, format, arg); -} \ No newline at end of file +}