disable logs
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user