diff options
Diffstat (limited to 'src/Log.cpp')
-rw-r--r-- | src/Log.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Log.cpp b/src/Log.cpp index f8f7d7f..90548af 100644 --- a/src/Log.cpp +++ b/src/Log.cpp @@ -74,7 +74,10 @@ void Logger::logstr(log_level_t level, std::string message) (*it)->log(level, message); } - std::cerr << levels_as_str[level] << " " << message << std::endl; + { + std::lock_guard<std::mutex> guard(m_cerr_mutex); + std::cerr << levels_as_str[level] << " " << message << std::endl; + } } |