summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/common/Logging.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/common/Logging.cpp b/lib/common/Logging.cpp
index 296443ea..d0e05394 100644
--- a/lib/common/Logging.cpp
+++ b/lib/common/Logging.cpp
@@ -446,6 +446,13 @@ int Syslog::GetNamedFacility(const std::string& rFacility)
bool FileLogger::Log(Log::Level Level, const std::string& rFile,
int line, std::string& rMessage)
{
+ if (mLogFile.StreamClosed())
+ {
+ /* skip this logger to allow logging failure to open
+ the log file, without causing an infinite loop */
+ return true;
+ }
+
if (Level > GetLevel())
{
return true;