From d492d10508d57a255eb445406570577d86c68698 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Traizet?= <cedric.traizet@c-s.fr>
Date: Fri, 3 May 2019 18:06:20 +0200
Subject: [PATCH] ENH: wrap logger messages in swig

---
 Modules/Wrappers/SWIG/src/otbPythonLogOutput.i | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/Modules/Wrappers/SWIG/src/otbPythonLogOutput.i b/Modules/Wrappers/SWIG/src/otbPythonLogOutput.i
index 4bd7852b2e..748c8bfef4 100644
--- a/Modules/Wrappers/SWIG/src/otbPythonLogOutput.i
+++ b/Modules/Wrappers/SWIG/src/otbPythonLogOutput.i
@@ -72,6 +72,15 @@ public:
   virtual void AddLogOutput(itkLogOutput *output);
   static Logger * Instance();
   void ResetOutputs();
+
+  // Wrap message methods so we can print stuff from Python
+  void Debug(std::string const & message);
+  void Info(std::string const & message);
+  void Warning(std::string const & message);
+  void Critical(std::string const & message);
+  void Error(std::string const & message);
+  void Fatal(std::string const & message);
+
 protected:
   Logger();
   virtual ~Logger();
-- 
GitLab