Add running core to Log

This commit is contained in:
fvanroie 2021-06-19 01:44:14 +02:00
parent 29fec3e8cc
commit 702e67078a

View File

@ -69,6 +69,7 @@ static void debugPrintTimestamp(int level, Print* _logOutput)
strftime(buffer, sizeof(buffer), " [" D_TIMESTAMP, timeinfo); // Literal String
#ifdef ARDUINO
_logOutput->print(xPortGetCoreID());
_logOutput->printf(PSTR("%s.%03lu]"), buffer, milli);
#else
debug_print(_logOutput, PSTR("%s.%03lu]"), buffer, milli);
@ -78,6 +79,7 @@ static void debugPrintTimestamp(int level, Print* _logOutput)
uint32_t msecs = millis();
#ifdef ARDUINO
_logOutput->print(xPortGetCoreID());
_logOutput->printf(PSTR(" [" D_TIME_MILLIS ".%03d]"), msecs / 1000, msecs % 1000);
#else
debug_print(_logOutput, PSTR("[" D_TIME_MILLIS ".%03d]"), msecs / 1000, msecs % 1000);