mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 19:03:16 +00:00
- 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)
25 lines
542 B
C++
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
|