summaryrefslogtreecommitdiff
path: root/src/log.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/log.hpp')
-rw-r--r--src/log.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/log.hpp b/src/log.hpp
index 8e7f0c1..996b6bc 100644
--- a/src/log.hpp
+++ b/src/log.hpp
@@ -6,11 +6,19 @@
#include <unistd.h>
inline void log(FILE *_stream, eFormatType type, std::string str) {
+#ifndef DEBUG
+ if (type == TRACE)
+ return;
+#endif
std::println(_stream, "{}", NFormatter::fmt(type, str));
}
template <typename... Args>
void log(FILE *_stream, eFormatType type, std::format_string<Args...> fmt, Args &&...args) {
+#ifndef DEBUG
+ if (type == TRACE)
+ return;
+#endif
std::println(_stream, "{}", NFormatter::fmt(type, fmt, std::forward<Args>(args)...));
}