Skip to content
Snippets Groups Projects
Commit 784e717f authored by Cédric Traizet's avatar Cédric Traizet
Browse files

ENH: otb log (other than app) are now redirected in Python

parent a3e6062e
No related branches found
No related tags found
No related merge requests found
...@@ -67,9 +67,20 @@ class Logger ...@@ -67,9 +67,20 @@ class Logger
{ {
public: public:
virtual void AddLogOutput(itkLogOutput *output); virtual void AddLogOutput(itkLogOutput *output);
static Logger * Instance();
void ResetOutputs();
protected: protected:
Logger(); Logger();
virtual ~Logger(); virtual ~Logger();
}; };
%pythoncode {
libraryLogOutput = PythonLogOutput_New()
libraryLogCallback = PythonLogOutputCallback()
Logger.Instance().ResetOutputs()
libraryLogOutput.SetCallback(libraryLogCallback)
Logger.Instance().AddLogOutput(libraryLogOutput.GetPointer())
}
#endif #endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment