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;