1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-16 07:23:07 +01:00

correctly handle pass and sizes

This commit is contained in:
wellenvogel
2022-11-15 23:33:49 +01:00
parent 86139fc445
commit c02be797db
5 changed files with 20 additions and 90 deletions

View File

@@ -15,6 +15,7 @@ class GwLog{
int logLevel=1;
GwLogWriter *writer;
SemaphoreHandle_t locker;
long long recordCounter=0;
public:
static const int LOG=1;
static const int ERROR=0;
@@ -29,6 +30,7 @@ class GwLog{
int isActive(int level){return level <= logLevel;};
void flush();
void setLevel(int level){this->logLevel=level;}
long long getRecordCounter(){return recordCounter;}
};
#define LOG_DEBUG(level,...){ if (logger != NULL && logger->isActive(level)) logger->logDebug(level,__VA_ARGS__);}