From 2139bde72d9c0c10380912502323f4782f3ffbe6 Mon Sep 17 00:00:00 2001
From: Guillaume Pasero <guillaume.pasero@c-s.fr>
Date: Wed, 18 Apr 2018 12:04:56 +0200
Subject: [PATCH] BUG: #1561: LogSetupInfo only displayed once per logger

---
 Modules/Core/Common/src/otbLogger.cxx | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Modules/Core/Common/src/otbLogger.cxx b/Modules/Core/Common/src/otbLogger.cxx
index 6678aa1632..2c4bfd184d 100644
--- a/Modules/Core/Common/src/otbLogger.cxx
+++ b/Modules/Core/Common/src/otbLogger.cxx
@@ -87,8 +87,9 @@ void Logger::LogSetupInformation()
     oss.str("");
     oss.clear();
 
-    // only switch the flag for the singleton, so that other instances can call
-    // LogSetupInformation() several times
+    // ensure LogSetupInformation is done once per logger, and also that it is
+    // skipped by the singleton when it has already been printed by an other instance
+    LogSetupInformationDone();
     Instance()->LogSetupInformationDone();
     }
 }
-- 
GitLab