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)
This commit is contained in:
committed by
GitHub
parent
6337458992
commit
88b3bfbe3e
@@ -0,0 +1,27 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user