From 54bbc8c117ea97b825bc5eb4ed2037fc189af390 Mon Sep 17 00:00:00 2001 From: Drath Date: Thu, 23 Oct 2025 13:01:51 +0200 Subject: [PATCH] disable logs --- include/log.hpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/include/log.hpp b/include/log.hpp index c384064..a7e919c 100644 --- a/include/log.hpp +++ b/include/log.hpp @@ -1,6 +1,9 @@ #ifndef LOG_HPP #define LOG_HPP +// #define log _log + +#ifdef log #include #include @@ -13,7 +16,7 @@ inline std::mutex fmtx; // file logging mutex enum class LOG { INF, WRN, ERR, DBG, START }; template -inline void log(LOG level, std::string_view tag, std::format_string str, Args&&... args) { +inline void _log(LOG level, std::string_view tag, std::format_string 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 str } } +#else + +#define log(...) + +#endif + #endif \ No newline at end of file