Class PyLogger¶
- Defined in File PyLogger.h
Inheritance Relationships¶
Base Type¶
public necsim::Logger(Class Logger)
Class Documentation¶
-
class
PyLogger: public necsim::Logger¶ Public Functions
-
~PyLogger()¶ Safely deletes the Python references.
-
void
setLogger(PyObject *logger)¶ Sets the logger object.
- Parameters
logger: the log object that is written out to
-
void
setLogFunction(PyObject *log_function)¶ Sets the logger function.
- Parameters
log_function: the function that will be used for writing out logs
-
bool
isSetup()¶ Checks if the logger has been setup.
- Return
- true if the logger object and the logger function have been set
-
void
writeInfo(string message)¶ Writes a message to the log object with level 20.
- Parameters
message: the message to write out
-
void
writeWarning(string message)¶ Writes a message to the log object with level 30.
- Parameters
message: the message to write out
-
void
writeError(string message)¶ Writes a message to the log object with level 40.
- Parameters
message: the message to write out
-
void
writeCritical(string message)¶ Writes a message to the log object with level 50.
- Parameters
message: the message to write out
-
void
write(const int &level, string message)¶ Writes a message to the log object with the supplied leve.
- Parameters
level: the logging level to write out atmessage: the message to write out
-
void
write(const int &level, stringstream &message)¶ Writes a message to the log object with the supplied leve.
- Parameters
level: the logging level to write out atmessage: the message to write out
-
void
writeInfo(string message) Logs an information message.
- Parameters
message: the message to write out
-
void
writeWarning(string message) Logs a warning message.
- Parameters
message: the message to write out
-
void
writeError(string message) Logs an error message.
- Parameters
message: the message to write out
-
void
writeCritical(string message) Logs a critical message.
- Parameters
message: the message to write out
-