DCMTK
Version 3.6.1 20120515
OFFIS DICOM Toolkit
|
The internal representation of logging events. More...
Public Member Functions | |
InternalLoggingEvent (const tstring &logger, LogLevel ll_, const tstring &message_, const char *filename, int line_, const char *function_) | |
Instantiate a LoggingEvent from the supplied parameters. | |
InternalLoggingEvent (const tstring &logger, LogLevel ll_, const tstring &ndc_, const tstring &message_, const tstring &thread_, helpers::Time time, const tstring &file_, int line_, const tstring &function_) | |
InternalLoggingEvent (const spi::InternalLoggingEvent &rhs) | |
virtual const tstring & | getMessage () const |
The application supplied message of logging event. | |
virtual unsigned int | getType () const |
Returns the 'type' of InternalLoggingEvent. | |
virtual OFauto_ptr < InternalLoggingEvent > | clone () const |
Returns a copy of this object. | |
const tstring & | getLoggerName () const |
The logger of the logging event. | |
LogLevel | getLogLevel () const |
LogLevel of logging event. | |
const tstring & | getNDC () const |
The nested diagnostic context (NDC) of logging event. | |
const tstring & | getThread () const |
The name of thread in which this logging event was generated. | |
const helpers::Time & | getTimestamp () const |
The number of milliseconds elapsed from 1/1/1970 until logging event was created. | |
const tstring & | getFile () const |
The is the file where this log statement was written. | |
int | getLine () const |
The is the line where this log statement was written. | |
const tstring & | getFunction () const |
The is the function where this log statement was written. | |
spi::InternalLoggingEvent & | operator= (const spi::InternalLoggingEvent &rhs) |
Static Public Member Functions | |
static unsigned int | getDefaultType () |
Protected Attributes | |
tstring | message |
Private Attributes | |
tstring | loggerName |
LogLevel | ll |
tstring | ndc |
tstring | thread |
helpers::Time | timestamp |
tstring | file |
int | line |
tstring | function |
bool | threadCached |
Indicates whether or not the Threadname has been retrieved. | |
bool | ndcCached |
Indicates whether or not the NDC has been retrieved. |
The internal representation of logging events.
When an affirmative decision is made to log then a InternalLoggingEvent
instance is created. This instance is passed around to the different log4cplus components.
This class is of concern to those wishing to extend log4cplus.
dcmtk::log4cplus::spi::InternalLoggingEvent::InternalLoggingEvent | ( | const tstring & | logger, |
LogLevel | ll_, | ||
const tstring & | message_, | ||
const char * | filename, | ||
int | line_, | ||
const char * | function_ | ||
) | [inline] |
Instantiate a LoggingEvent from the supplied parameters.
logger | The logger of this event. |
ll_ | The LogLevel of this event. |
message_ | The message of this event. |
filename | Name of file where this event has occurred, can be NULL. |
line_ | Line number in file specified by the filename parameter. |
function_ | Function where this event has occurred |
virtual OFauto_ptr<InternalLoggingEvent> dcmtk::log4cplus::spi::InternalLoggingEvent::clone | ( | ) | const [virtual] |
Returns a copy of this object.
Derived classes should override this method.
const tstring& dcmtk::log4cplus::spi::InternalLoggingEvent::getLoggerName | ( | ) | const [inline] |
The logger of the logging event.
It is set by the LoggingEvent constructor.
LogLevel dcmtk::log4cplus::spi::InternalLoggingEvent::getLogLevel | ( | ) | const [inline] |
LogLevel of logging event.
virtual const tstring& dcmtk::log4cplus::spi::InternalLoggingEvent::getMessage | ( | ) | const [virtual] |
The application supplied message of logging event.
const tstring& dcmtk::log4cplus::spi::InternalLoggingEvent::getNDC | ( | ) | const [inline] |
The nested diagnostic context (NDC) of logging event.
const tstring& dcmtk::log4cplus::spi::InternalLoggingEvent::getThread | ( | ) | const [inline] |
The name of thread in which this logging event was generated.
const helpers::Time& dcmtk::log4cplus::spi::InternalLoggingEvent::getTimestamp | ( | ) | const [inline] |
The number of milliseconds elapsed from 1/1/1970 until logging event was created.
virtual unsigned int dcmtk::log4cplus::spi::InternalLoggingEvent::getType | ( | ) | const [virtual] |
Returns the 'type' of InternalLoggingEvent.
Derived classes should override this method. (NOTE: Values <= 1000 are reserved for log4cplus and should not be used.)
bool dcmtk::log4cplus::spi::InternalLoggingEvent::ndcCached [mutable, private] |
Indicates whether or not the NDC has been retrieved.
bool dcmtk::log4cplus::spi::InternalLoggingEvent::threadCached [mutable, private] |
Indicates whether or not the Threadname has been retrieved.