mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-19 03:22:07 +00:00
Make LogRecord protobuf serial logging over Phone API opt-in instead (#4358)
* Make LogRecord protobuf serial logging over Phone API opt-in instead of enabled by default * debug_log_enabled
This commit is contained in:
parent
a1c998e7e0
commit
93ba19d1e1
@ -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)
|
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
|
meshtastic_LogRecord_Level ll = meshtastic_LogRecord_Level_UNSET; // default to unset
|
||||||
switch (logLevel[0]) {
|
switch (logLevel[0]) {
|
||||||
case 'D':
|
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);
|
emitLogRecord(ll, thread ? thread->ThreadName.c_str() : "", format, arg);
|
||||||
} else
|
} else
|
||||||
RedirectablePrint::log_to_serial(logLevel, format, arg);
|
RedirectablePrint::log_to_serial(logLevel, format, arg);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user