mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 06:32:19 +03:00
17 lines
422 B
C++
17 lines
422 B
C++
|
|
#include "utils/SerialPrint.h"
|
|
|
|
void SerialPrint(String errorLevel, String module, String msg) {
|
|
String tosend;
|
|
|
|
tosend = prettyMillis(millis());
|
|
|
|
tosend = tosend + " [" + errorLevel + "] [" + module + "] " + msg;
|
|
Serial.println(tosend);
|
|
|
|
if (isNetworkActive()) {
|
|
if (jsonReadInt(settingsFlashJson, F("log")) != 0) {
|
|
standWebSocket.broadcastTXT("/log|" + tosend);
|
|
}
|
|
}
|
|
} |