Attempt to fix a log output deadlock issue.

This commit is contained in:
Leon Styhre 2022-09-23 22:49:17 +02:00
parent 6a2a3b1259
commit 782d68f906

View file

@ -85,6 +85,7 @@ std::ostringstream& Log::get(LogLevel level)
#else
localtime_r(&t, &tm);
#endif
std::unique_lock<std::mutex> lock {sLogMutex};
mOutStringStream << std::put_time(&tm, "%b %d %T ") << mLogLevelMap[level] << ":\t";
mMessageLevel = level;