mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-16 07:23:07 +01:00
make logging thread safe
This commit is contained in:
@@ -12,6 +12,7 @@ class GwLog{
|
||||
char buffer[100];
|
||||
int logLevel=1;
|
||||
GwLogWriter *writer;
|
||||
SemaphoreHandle_t locker;
|
||||
public:
|
||||
static const int LOG=1;
|
||||
static const int ERROR=0;
|
||||
@@ -19,6 +20,7 @@ class GwLog{
|
||||
static const int TRACE=2;
|
||||
String prefix="LOG:";
|
||||
GwLog(int level=LOG, GwLogWriter *writer=NULL);
|
||||
~GwLog();
|
||||
void setWriter(GwLogWriter *writer);
|
||||
void logString(const char *fmt,...);
|
||||
void logDebug(int level, const char *fmt,...);
|
||||
|
||||
Reference in New Issue
Block a user