summaryrefslogtreecommitdiffstats
path: root/src/Log.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Log.cpp')
-rw-r--r--src/Log.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Log.cpp b/src/Log.cpp
index 7db1d44..6bbc7a9 100644
--- a/src/Log.cpp
+++ b/src/Log.cpp
@@ -72,7 +72,10 @@ void Logger::logstr(log_level_t level, std::string message)
backend->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;
+ }
}