 |
Belle II Software
release-05-02-19
|
13 #include <framework/logging/LogConfig.h>
15 #include <boost/python/dict.hpp>
46 class LogPythonInterface {
145 void addLogFile(
const std::string& filename,
bool append =
false);
166 void addLogUDP(
const std::string& hostname,
unsigned short port);
214 static boost::python::object
logDebug(boost::python::tuple args,
const boost::python::dict& kwargs);
221 static boost::python::object
logInfo(boost::python::tuple args,
const boost::python::dict& kwargs);
229 static boost::python::object
logResult(boost::python::tuple args,
const boost::python::dict& kwargs);
236 static boost::python::object
logWarning(boost::python::tuple args,
const boost::python::dict& kwargs);
243 static boost::python::object
logError(boost::python::tuple args,
const boost::python::dict& kwargs);
251 static boost::python::object
logFatal(boost::python::tuple args,
const boost::python::dict& kwargs);
int getLogInfo(LogConfig::ELogLevel level)
Get the printed log information for the given level.
static boost::python::object logError(boost::python::tuple args, const boost::python::dict &kwargs)
Produce error message.
bool getPythonLoggingEnabled() const
Get flag if logging should be done via python sys.stdout
static boost::python::object logDebug(boost::python::tuple args, const boost::python::dict &kwargs)
Produce debug message.
LogConfig::ELogLevel getAbortLevel()
Get the abort level.
void addLogConsole()
Add the console as output connection.
void addLogFile(const std::string &filename, bool append=false)
Add a file as output connection.
void setMaxMessageRepetitions(unsigned repetitions)
Set maximum number of repetitions before silencing "identical" log messages.
boost::python::dict getLogStatistics()
return dict with log statistics
void addLogUDP(const std::string &hostname, unsigned short port)
Add a UDP server as an output connection.
static boost::python::object logFatal(boost::python::tuple args, const boost::python::dict &kwargs)
Produce fatal message.
unsigned getMaxMessageRepetitions() const
Get maximum number of repetitions before silencing "identical" log messages.
ELogLevel
Definition of the supported log levels.
void setAbortLevel(LogConfig::ELogLevel level)
Set the abort log level.
void reset()
Reset logging connections.
LogConfig & getPackageLogConfig(const std::string &package)
Get the LogConfig for the given package.
void zeroCounters()
Reset logging counters.
LogConfig::ELogLevel getLogLevel()
Get the log level.
static void exposePythonAPI()
expose python API
Abstract base class for different kinds of events.
void setDebugLevel(int level)
Set the debug messaging level.
void setPackageLogConfig(const std::string &package, const LogConfig &config)
Set LogConfig for a given package.
static boost::python::object logInfo(boost::python::tuple args, const boost::python::dict &kwargs)
Produce info message.
void setLogInfo(LogConfig::ELogLevel level, int info)
Set the printed log information for the given level.
void enableErrorSummary(bool on)
Enable/Disable error summary.
static boost::python::object logResult(boost::python::tuple args, const boost::python::dict &kwargs)
Produce result 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...
bool getEscapeNewlinesEnabled() const
Get flag if newlines in log messages to console should be replaced by ' '`.
int getDebugLevel()
Get the debug level.
void setLogLevel(LogConfig::ELogLevel level)
Set the log level.
void setPythonLoggingEnabled(bool enabled) const
Set flag if logging should be done via python sys.stdout
void setEscapeNewlinesEnabled(bool enabled) const
Set flag if newlines in log messages to console should be replaced by ' '.
static boost::python::object logWarning(boost::python::tuple args, const boost::python::dict &kwargs)
Produce warning message.