Меняем формат штампа времени в логах

This commit is contained in:
2022-04-30 09:28:49 +03:00
parent 790c289183
commit 83c5d74d7a
2 changed files with 11 additions and 4 deletions

View File

@@ -1,8 +1,15 @@
#include "utils/SerialPrint.h"
#include "classes/IoTRTC.h"
extern IoTRTC *watch;
void SerialPrint(String errorLevel, String module, String msg) {
String tosend = prettyMillis(millis()) + " [" + errorLevel + "] [" + module + "] " + msg;
String tosend;
if (watch) tosend = watch->gettime("d.m.y H:i:s");
else tosend = prettyMillis(millis());
tosend = tosend + " [" + errorLevel + "] [" + module + "] " + msg;
Serial.println(tosend);
if (isNetworkActive()) {