disable logs

This commit is contained in:
Drath
2025-10-23 13:01:51 +02:00
parent 3d6679ff2a
commit 54bbc8c117

View File

@@ -1,6 +1,9 @@
#ifndef LOG_HPP
#define LOG_HPP
// #define log _log
#ifdef log
#include <zlib.h>
#include <chrono>
@@ -13,7 +16,7 @@ inline std::mutex fmtx; // file logging mutex
enum class LOG { INF, WRN, ERR, DBG, START };
template <typename... Args>
inline void log(LOG level, std::string_view tag, std::format_string<Args...> str, Args&&... args) {
inline void _log(LOG level, std::string_view tag, std::format_string<Args...> str, Args&&... args) {
constexpr bool logToFile = true;
constexpr std::string_view reset = "\033[0m";
constexpr std::string_view pattern = "[{}{}{}] ";
@@ -57,4 +60,10 @@ inline void log(LOG level, std::string_view tag, std::format_string<Args...> str
}
}
#else
#define log(...)
#endif
#endif