Ken Van Hoeylandt 88b3bfbe3e
Logging improvements and C++23 (#206)
- Improved logging code by splitting functionality up into different files
- Set C++23 as new standard (it was already the implied standard due to some code, but now it's explicit)
2025-02-06 22:55:51 +01:00

25 lines
542 B
C++

#ifdef ESP_PLATFORM
#include "Tactility/LogCommon.h"
#include <esp_log.h>
namespace tt {
void storeLog(LogLevel level, const char* format, va_list args);
}
extern "C" {
extern void __real_esp_log_write(esp_log_level_t level, const char* tag, const char* format, ...);
void __wrap_esp_log_write(esp_log_level_t level, const char* tag, const char* format, ...) {
va_list args;
va_start(args, format);
tt::storeLog((tt::LogLevel)level, format, args);
esp_log_writev(level, tag, format, args);
va_end(args);
}
}
#endif