33 #include "dcmtk/config/osconfig.h" 36 #include "dcmtk/ofstd/oftypes.h" 37 #include "dcmtk/ofstd/ofconapp.h" 39 #define OFLOG_TRACE(logger, msg) LOG4CPLUS_TRACE(logger, msg) 40 #define OFLOG_DEBUG(logger, msg) LOG4CPLUS_DEBUG(logger, msg) 41 #define OFLOG_INFO(logger, msg) LOG4CPLUS_INFO(logger, msg) 42 #define OFLOG_WARN(logger, msg) LOG4CPLUS_WARN(logger, msg) 43 #define OFLOG_ERROR(logger, msg) LOG4CPLUS_ERROR(logger, msg) 44 #define OFLOG_FATAL(logger, msg) LOG4CPLUS_FATAL(logger, msg) 83 return Logger::isEnabledFor(ll);
88 const char* file=NULL,
int line=-1,
const char*
function=NULL)
const {
89 Logger::forcedLog(ll, message, file, line,
function);
99 return OFstatic_cast(
LogLevel, Logger::getChainedLogLevel());
123 static OFLogger getLogger(
const char *name);
bool isEnabledFor(log4cplus::LogLevel ll) const
check if the given log level was activated.
warn: potentially harmful situations
void forcedLog(log4cplus::LogLevel ll, const 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
functions for initializing the logging system
support class for console applications.
LogLevel
these are the log levels that you can feed to isEnabledFor()
This is the central class in the log4cplus package.
info: informational messages that highlight the progress of the application at coarse-grained level ...
static OFauto_ptr< log4cplus::helpers::Properties > configProperties_
If we loaded a config file in configureFromCommandLine(), this is it.
fatal: very severe error events that will presumably lead the application to abort ...
OFLog()
private constructor, don't create instances of this class
debug: fine-grained informational events that are most useful to debug an application ...
error: events that might still allow the application to continue running
LogLevel getChainedLogLevel() const
Get the logger's log level.
int LogLevel
Defines the minimum set of priorities recognized by the system, that is FATAL_LOG_LEVEL, ERROR_LOG_LEVEL, WARN_LOG_LEVEL, INFO_LOG_LEVEL, DEBUG_LOG_LEVEL, and TRACE_LOG_LEVEL.
This header defines the Logger class and the logging macros.
OFLogger(const log4cplus::Logger &base)
copy constructor
simple wrapper around the "low-level" Logger object to make it easier to switch to a different system...
trace: output more details on the internal application state, a kind of "verbose debug" ...
a simple string class that implements a subset of std::string.
handles command line arguments.