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

28 lines
714 B
C++

#pragma once
#ifndef ESP_PLATFORM
#include "LogCommon.h"
#include <cstdarg>
#include <cstdio>
namespace tt {
void log(LogLevel level, const char* tag, const char* format, ...);
} // namespace
#define TT_LOG_E(tag, format, ...) \
tt::log(tt::LogLevel::Error, tag, format, ##__VA_ARGS__)
#define TT_LOG_W(tag, format, ...) \
tt::log(tt::LogLevel::Warning, tag, format, ##__VA_ARGS__)
#define TT_LOG_I(tag, format, ...) \
tt::log(tt::LogLevel::Info, tag, format, ##__VA_ARGS__)
#define TT_LOG_D(tag, format, ...) \
tt::log(tt::LogLevel::Debug, tag, format, ##__VA_ARGS__)
#define TT_LOG_V(tag, format, ...) \
tt::log(tt::LogLevel::Trace, tag, format, ##__VA_ARGS__)
#endif // ESP_PLATFORM