ATLAS Offline Software
|
A concrete implementation of ILogger that calls back to Python. More...
#include <PyLogger.h>
Public Member Functions | |
PyLogger (PyObject *debugfn, PyObject *errorfn) | |
Constructor. More... | |
~PyLogger () | |
Destructor. More... | |
virtual void | debug (const char *msg) |
Log a debugging message. More... | |
virtual void | error (const char *msg) |
Log an error message. More... | |
Static Private Member Functions | |
static void | call (PyObject *fn, const char *msg) |
Common code to call Python callback. More... | |
Private Attributes | |
PyObject * | m_debugfn |
The debug message function. More... | |
PyObject * | m_errorfn |
The error message function. More... | |
A concrete implementation of ILogger that calls back to Python.
Definition at line 35 of file PyLogger.h.
Constructor.
debugfn | Function to call for a debug message. |
errorfn | Function to call for an error message. |
The functions should take a single string parameter. Passing None means to skip the call.
Definition at line 27 of file PyLogger.cxx.
RootUtils::PyLogger::~PyLogger | ( | ) |
Destructor.
Definition at line 39 of file PyLogger.cxx.
Common code to call Python callback.
fn | The Python function to call (or None). |
msg | The string to pass to it. |
May raise an exception, if the Python code does.
Definition at line 73 of file PyLogger.cxx.
|
virtual |
Log a debugging message.
msg | The message to log. |
Implements RootUtils::ILogger.
Definition at line 50 of file PyLogger.cxx.
|
virtual |
Log an error message.
msg | The message to log. |
Implements RootUtils::ILogger.
Definition at line 60 of file PyLogger.cxx.
|
private |
The debug message function.
Definition at line 80 of file PyLogger.h.
|
private |
The error message function.
Definition at line 83 of file PyLogger.h.