Skip to content

Commit

Permalink
Make LogRecord protobuf serial logging over Phone API opt-in instead (#…
Browse files Browse the repository at this point in the history
…4358)

* Make LogRecord protobuf serial logging over Phone API opt-in instead of enabled by default

* debug_log_enabled
  • Loading branch information
thebentern committed Jul 30, 2024
1 parent a1c998e commit 93ba19d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SerialConsole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand All @@ -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);
}
}

0 comments on commit 93ba19d

Please sign in to comment.