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