diff --git a/include/hasp_macro.h b/include/hasp_macro.h index e7a2c91a..035df82a 100644 --- a/include/hasp_macro.h +++ b/include/hasp_macro.h @@ -4,10 +4,16 @@ #ifndef HASP_MACRO_H #define HASP_MACRO_H +#ifdef USE_CONFIG_OVERRIDE +#include "user_config_override.h" +#endif + #if defined(WINDOWS) || defined(POSIX) #define LOG_OUTPUT(x, ...) printf(__VA_ARGS__) #else +#include "ArduinoLog.h" + #ifndef HASP_LOG_LEVEL #define HASP_LOG_LEVEL LOG_LEVEL_TRACE #endif diff --git a/src/hasp/hasp_task.cpp b/src/hasp/hasp_task.cpp index 5e344284..e73eb809 100644 --- a/src/hasp/hasp_task.cpp +++ b/src/hasp/hasp_task.cpp @@ -73,7 +73,7 @@ void task_every_second_cb(lv_task_t* task) case 5: #ifdef HASP_USE_STAT_COUNTER if(statLoopCounter) - LOG_VERBOSE(TAG_MAIN, F("%d millis per loop, %d counted"), 5000 / statLoopCounter, statLoopCounter); + LOG_DEBUG(TAG_MAIN, F("%d millis per loop, %d counted"), 5000 / statLoopCounter, statLoopCounter); statLoopCounter = 0; #endif break; diff --git a/src/log/hasp_debug.cpp b/src/log/hasp_debug.cpp index ba76afdd..6c867844 100644 --- a/src/log/hasp_debug.cpp +++ b/src/log/hasp_debug.cpp @@ -114,7 +114,7 @@ void debugStartSyslog() if(syslogClient) { if(syslogClient->beginPacket(debugSyslogHost, debugSyslogPort)) { - Log.registerOutput(2, syslogClient, LOG_LEVEL_VERBOSE, true); + Log.registerOutput(2, syslogClient, HASP_LOG_LEVEL, true); LOG_INFO(TAG_SYSL, F(D_SERVICE_STARTED)); } } else { @@ -364,7 +364,7 @@ void debugStartSerial() Serial.begin(baudrate); /* prepare for possible serial debug */ delay(10); - Log.registerOutput(0, &Serial, LOG_LEVEL_VERBOSE, true); // LOG_LEVEL_VERBOSE + Log.registerOutput(0, &Serial, HASP_LOG_LEVEL, true); // LOG_LEVEL_VERBOSE // debugSerialStarted = true; diff --git a/src/main_arduino.cpp b/src/main_arduino.cpp index 224b490e..abf444e6 100644 --- a/src/main_arduino.cpp +++ b/src/main_arduino.cpp @@ -210,7 +210,7 @@ IRAM_ATTR void loop() mainLoopCounter = 0; #ifdef HASP_USE_STAT_COUNTER if(statLoopCounter) - LOG_VERBOSE(TAG_MAIN, F("%d millis per loop, %d counted"), 5000 / statLoopCounter, statLoopCounter); + LOG_DEBUG(TAG_MAIN, F("%d millis per loop, %d counted"), 5000 / statLoopCounter, statLoopCounter); statLoopCounter = 0; #endif break; diff --git a/src/sys/svc/hasp_console.cpp b/src/sys/svc/hasp_console.cpp index 6a0ad26a..99829f92 100644 --- a/src/sys/svc/hasp_console.cpp +++ b/src/sys/svc/hasp_console.cpp @@ -111,7 +111,7 @@ void consoleStart() debugStartSerial(); // open Serial port /* Now register logger for serial */ - Log.registerOutput(0, bufferedSerialClient, LOG_LEVEL_VERBOSE, true); + Log.registerOutput(0, bufferedSerialClient, HASP_LOG_LEVEL, true); bufferedSerialClient->flush(); LOG_INFO(TAG_CONS, F(D_SERVICE_STARTED));