407 добавил лог в веб интерфейс!

This commit is contained in:
Dmitry Borisenko
2022-02-19 23:42:24 +01:00
parent 27dfc24d4c
commit cce5726390
7 changed files with 38 additions and 12 deletions

View File

@@ -2,8 +2,10 @@
#include "utils/SerialPrint.h"
void SerialPrint(String errorLevel, String module, String msg) {
Serial.println(prettyMillis(millis()) + " [" + errorLevel + "] [" + module + "] " + msg);
String tosend = "[" + errorLevel + "] [" + module + "] " + msg;
String tosend = prettyMillis(millis()) + " [" + errorLevel + "] [" + module + "] " + msg;
Serial.println(tosend);
// ws.textAll(tosend);
if (jsonReadInt(settingsFlashJson, F("log")) != 0) {
standWebSocket.broadcastTXT("/log|" + tosend);
}
}