Fix race condition in icinga::Log.

Refs #5337
This commit is contained in:
Gunnar Beutner 2013-12-15 18:15:05 +01:00
parent 0af81f2da2
commit f08bca220d
1 changed files with 3 additions and 3 deletions

View File

@ -88,12 +88,12 @@ void icinga::Log(LogSeverity severity, const String& facility,
bool processed = false; bool processed = false;
BOOST_FOREACH(const Logger::Ptr& logger, Logger::GetLoggers()) { BOOST_FOREACH(const Logger::Ptr& logger, Logger::GetLoggers()) {
if (!logger->IsActive())
continue;
{ {
ObjectLock llock(logger); ObjectLock llock(logger);
if (!logger->IsActive())
continue;
if (entry.Severity >= logger->GetMinSeverity()) if (entry.Severity >= logger->GetMinSeverity())
logger->ProcessLogEntry(entry); logger->ProcessLogEntry(entry);
} }