DCMTK
Version 3.6.1 20120515
OFFIS DICOM Toolkit
|
simple wrapper around the "low-level" Logger object to make it easier to switch to a different system More...
Public Types | |
enum | LogLevel { TRACE_LOG_LEVEL = dcmtk::log4cplus::TRACE_LOG_LEVEL, DEBUG_LOG_LEVEL = dcmtk::log4cplus::DEBUG_LOG_LEVEL, INFO_LOG_LEVEL = dcmtk::log4cplus::INFO_LOG_LEVEL, WARN_LOG_LEVEL = dcmtk::log4cplus::WARN_LOG_LEVEL, ERROR_LOG_LEVEL = dcmtk::log4cplus::ERROR_LOG_LEVEL, FATAL_LOG_LEVEL = dcmtk::log4cplus::FATAL_LOG_LEVEL, OFF_LOG_LEVEL = dcmtk::log4cplus::OFF_LOG_LEVEL } |
these are the log levels that you can feed to isEnabledFor() More... | |
Public Member Functions | |
OFLogger (const dcmtk::log4cplus::Logger &base) | |
copy constructor | |
bool | isEnabledFor (dcmtk::log4cplus::LogLevel ll) const |
check if the given log level was activated. | |
void | forcedLog (dcmtk::log4cplus::LogLevel ll, const dcmtk::log4cplus::tstring &message, const char *file=NULL, int line=-1, const char *function=NULL) const |
this function is only used internally by OFLOG_FATAL and friends | |
LogLevel | getChainedLogLevel () const |
Get the logger's log level. | |
void | setLogLevel (dcmtk::log4cplus::LogLevel ll) |
Set the logger's log level. |
simple wrapper around the "low-level" Logger object to make it easier to switch to a different system
enum OFLogger::LogLevel |
these are the log levels that you can feed to isEnabledFor()
OFLogger::OFLogger | ( | const dcmtk::log4cplus::Logger & | base | ) |
copy constructor
base | object to be copied |
LogLevel OFLogger::getChainedLogLevel | ( | ) | const [inline] |
Get the logger's log level.
One of the checks that isEnabledFor() does looks like this: if (getChainedLogLevel() < level) return false;
Reimplemented from dcmtk::log4cplus::Logger.
bool OFLogger::isEnabledFor | ( | dcmtk::log4cplus::LogLevel | ll | ) | const [inline] |
check if the given log level was activated.
This can be used to check if a given log level is activated before spending cpu time on generating a log message. The OFLOG_* macros use this automatically, so you should never do something like: if (myLogger.isEnabledFor(INFO_LOG_LEVEL)) OFLOG_INFO("Doing it like this is pointless);
ll | the log level to check for |
Reimplemented from dcmtk::log4cplus::Logger.
void OFLogger::setLogLevel | ( | dcmtk::log4cplus::LogLevel | ll | ) | [inline] |
Set the logger's log level.
ll | log level to which this logger is set. |
Reimplemented from dcmtk::log4cplus::Logger.