mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-28 13:46:36 +00:00
Add running core to Log
This commit is contained in:
parent
29fec3e8cc
commit
702e67078a
@ -66,9 +66,10 @@ static void debugPrintTimestamp(int level, Print* _logOutput)
|
||||
unsigned long int milli = curTime.tv_usec / 1000;
|
||||
char buffer[24];
|
||||
// strftime(buffer, sizeof(buffer), "[%b %d %H:%M:%S", timeinfo); // Literal String
|
||||
strftime(buffer, sizeof(buffer), "[" D_TIMESTAMP, timeinfo); // Literal String
|
||||
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,7 +79,8 @@ static void debugPrintTimestamp(int level, Print* _logOutput)
|
||||
|
||||
uint32_t msecs = millis();
|
||||
#ifdef ARDUINO
|
||||
_logOutput->printf(PSTR("[" D_TIME_MILLIS ".%03d]"), msecs / 1000, msecs % 1000);
|
||||
_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);
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user