11#include <framework/logging/LogConfig.h>
13#include <boost/python/dict.hpp>
143 void addLogFile(
const std::string& filename,
bool append =
false);
164 void addLogUDP(
const std::string& hostname,
unsigned short port);
212 static boost::python::object
logDebug(boost::python::tuple args,
const boost::python::dict& kwargs);
219 static boost::python::object
logInfo(boost::python::tuple args,
const boost::python::dict& kwargs);
227 static boost::python::object
logResult(boost::python::tuple args,
const boost::python::dict& kwargs);
234 static boost::python::object
logWarning(boost::python::tuple args,
const boost::python::dict& kwargs);
241 static boost::python::object
logError(boost::python::tuple args,
const boost::python::dict& kwargs);
249 static boost::python::object
logFatal(boost::python::tuple args,
const boost::python::dict& kwargs);
ELogLevel
Definition of the supported log levels.
Thin wrapper to expose a usable interface to the logging framework in python.
bool getEscapeNewlinesEnabled() const
Get flag if newlines in log messages to console should be replaced by ' '`.
void setDebugLevel(int level)
Set the debug messaging level.
void setAbortLevel(LogConfig::ELogLevel level)
Set the abort log level.
static boost::python::object logFatal(boost::python::tuple args, const boost::python::dict &kwargs)
Produce fatal message.
int getLogInfo(LogConfig::ELogLevel level)
Get the printed log information for the given level.
boost::python::dict getLogStatistics()
return dict with log statistics
void setPackageLogConfig(const std::string &package, const LogConfig &config)
Set LogConfig for a given package.
void addLogFile(const std::string &filename, bool append=false)
Add a file as output connection.
void setPythonLoggingEnabled(bool enabled) const
Set flag if logging should be done via python sys.stdout
LogConfig::ELogLevel getAbortLevel()
Get the abort level.
static boost::python::object logWarning(boost::python::tuple args, const boost::python::dict &kwargs)
Produce warning message.
static void exposePythonAPI()
expose python API
bool getPythonLoggingEnabled() const
Get flag if logging should be done via python sys.stdout
void enableErrorSummary(bool on)
Enable/Disable error summary.
void setMaxMessageRepetitions(unsigned repetitions)
Set maximum number of repetitions before silencing "identical" log messages.
static boost::python::object logDebug(boost::python::tuple args, const boost::python::dict &kwargs)
Produce debug message.
void addLogConsole()
Add the console as output connection.
void addLogUDP(const std::string &hostname, unsigned short port)
Add a UDP server as an output connection.
void setLogLevel(LogConfig::ELogLevel level)
Set the log level.
int getDebugLevel()
Get the debug level.
void reset()
Reset logging connections.
static boost::python::object logInfo(boost::python::tuple args, const boost::python::dict &kwargs)
Produce info message.
void addLogJSON(bool complete)
Add the console as output connection but print the log messages as json objects so that they can be p...
void setLogInfo(LogConfig::ELogLevel level, int info)
Set the printed log information for the given level.
unsigned getMaxMessageRepetitions() const
Get maximum number of repetitions before silencing "identical" log messages.
void setEscapeNewlinesEnabled(bool enabled) const
Set flag if newlines in log messages to console should be replaced by ' '.
LogConfig & getPackageLogConfig(const std::string &package)
Get the LogConfig for the given package.
void zeroCounters()
Reset logging counters.
static boost::python::object logError(boost::python::tuple args, const boost::python::dict &kwargs)
Produce error message.
static boost::python::object logResult(boost::python::tuple args, const boost::python::dict &kwargs)
Produce result message.
LogConfig::ELogLevel getLogLevel()
Get the log level.
Abstract base class for different kinds of events.