From f08bca220dd5e9dffa412be82188b09f977e2291 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Sun, 15 Dec 2013 18:15:05 +0100 Subject: [PATCH] Fix race condition in icinga::Log. Refs #5337 --- lib/base/logger.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/base/logger.cpp b/lib/base/logger.cpp index 710c54211..5ad98aa28 100644 --- a/lib/base/logger.cpp +++ b/lib/base/logger.cpp @@ -88,12 +88,12 @@ void icinga::Log(LogSeverity severity, const String& facility, bool processed = false; BOOST_FOREACH(const Logger::Ptr& logger, Logger::GetLoggers()) { - if (!logger->IsActive()) - continue; - { ObjectLock llock(logger); + if (!logger->IsActive()) + continue; + if (entry.Severity >= logger->GetMinSeverity()) logger->ProcessLogEntry(entry); }