diff options
Diffstat (limited to 'src/debug')
| -rw-r--r-- | src/debug/Log.cpp | 4 | ||||
| -rw-r--r-- | src/debug/Log.hpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/debug/Log.cpp b/src/debug/Log.cpp index b5865f0a..8d84840e 100644 --- a/src/debug/Log.cpp +++ b/src/debug/Log.cpp @@ -24,7 +24,9 @@ void Debug::log(eLogLevel level, std::string str) { if (m_shuttingDown) return; - std::string coloredStr = str; + std::lock_guard<std::mutex> guard(m_logMutex); + + std::string coloredStr = str; //NOLINTBEGIN switch (level) { case LOG: diff --git a/src/debug/Log.hpp b/src/debug/Log.hpp index 6a380783..c3146805 100644 --- a/src/debug/Log.hpp +++ b/src/debug/Log.hpp @@ -42,8 +42,6 @@ namespace Debug { template <typename... Args> //NOLINTNEXTLINE void log(eLogLevel level, std::format_string<Args...> fmt, Args&&... args) { - std::lock_guard<std::mutex> guard(m_logMutex); - if (level == TRACE && !m_trace) return; |
