123456789101112131415161718192021222324 |
- #pragma once
-
- #if APP_CORE_LOGS
-
- #define APP_CORE_LOGS_LEVEL 1
-
- #define LOG(level_, ...) do { \
- if (level_ <= APP_CORE_LOGS_LEVEL) \
- { \
- char tmp[100]; \
- snprintf(tmp, sizeof(tmp), __VA_ARGS__); \
- Serial.println(tmp); \
- } \
- } while (0)
-
- #define LOG_FN_BEGIN(level_) LOG(level_, "%s: Begin", __FUNCTION__)
- #define LOG_FN_END(level_) LOG(level_, "%s: End", __FUNCTION__)
-
- #else
-
- #define LOG(x)
- #define LOG(x, ...)
-
- #endif
|