summaryrefslogtreecommitdiff
path: root/src/debug
diff options
context:
space:
mode:
Diffstat (limited to 'src/debug')
-rw-r--r--src/debug/Log.cpp3
-rw-r--r--src/debug/Log.hpp1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/debug/Log.cpp b/src/debug/Log.cpp
index a864f0d2..2fa4a127 100644
--- a/src/debug/Log.cpp
+++ b/src/debug/Log.cpp
@@ -14,6 +14,9 @@ void Debug::init(std::string IS) {
void Debug::log(LogLevel level, const char* fmt, ...) {
+ if (disableLogs && *disableLogs)
+ return;
+
// log to a file
std::ofstream ofs;
ofs.open(logFile, std::ios::out | std::ios::app);
diff --git a/src/debug/Log.hpp b/src/debug/Log.hpp
index 814da421..bde9b820 100644
--- a/src/debug/Log.hpp
+++ b/src/debug/Log.hpp
@@ -17,4 +17,5 @@ namespace Debug {
void log(LogLevel level, const char* fmt, ...);
inline std::string logFile;
+ inline int64_t* disableLogs = nullptr;
}; \ No newline at end of file