From 782d68f906ed8af706499acdba4722cbfdc26447 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Fri, 23 Sep 2022 22:49:17 +0200 Subject: [PATCH] Attempt to fix a log output deadlock issue. --- es-core/src/Log.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/es-core/src/Log.cpp b/es-core/src/Log.cpp index 07dbb8740..fea8a2635 100644 --- a/es-core/src/Log.cpp +++ b/es-core/src/Log.cpp @@ -85,6 +85,7 @@ std::ostringstream& Log::get(LogLevel level) #else localtime_r(&t, &tm); #endif + std::unique_lock lock {sLogMutex}; mOutStringStream << std::put_time(&tm, "%b %d %T ") << mLogLevelMap[level] << ":\t"; mMessageLevel = level;