DCMTK  Version 3.6.1 20131114
OFFIS DICOM Toolkit
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
dcmtk::log4cplus::spi::InternalLoggingEvent Class Reference

The internal representation of logging events. More...

+ Collaboration diagram for dcmtk::log4cplus::spi::InternalLoggingEvent:

Public Member Functions

 InternalLoggingEvent (const log4cplus::tstring &logger, LogLevel loglevel, const log4cplus::tstring &message, const char *filename, int line)
 Instantiate a LoggingEvent from the supplied parameters. More...
 
 InternalLoggingEvent (const log4cplus::tstring &logger, LogLevel loglevel, const log4cplus::tstring &ndc, MappedDiagnosticContextMap const &mdc, const log4cplus::tstring &message, const log4cplus::tstring &thread, log4cplus::helpers::Time time, const log4cplus::tstring &file, int line)
 
 InternalLoggingEvent (const log4cplus::spi::InternalLoggingEvent &rhs)
 
void setLoggingEvent (const log4cplus::tstring &logger, LogLevel ll, const log4cplus::tstring &message, const char *filename, int line)
 
void setFunction (char const *func)
 
void setFunction (log4cplus::tstring const &)
 
virtual const log4cplus::tstringgetMessage () const
 The application supplied message of logging event. More...
 
virtual unsigned int getType () const
 Returns the 'type' of InternalLoggingEvent. More...
 
virtual OFauto_ptr
< InternalLoggingEvent
clone () const
 Returns a copy of this object. More...
 
const log4cplus::tstringgetLoggerName () const
 The logger of the logging event. More...
 
LogLevel getLogLevel () const
 LogLevel of logging event. More...
 
const log4cplus::tstringgetNDC () const
 The nested diagnostic context (NDC) of logging event. More...
 
MappedDiagnosticContextMap const & getMDCCopy () const
 
tstring const & getMDC (tstring const &key) const
 
const log4cplus::tstringgetThread () const
 The name of thread in which this logging event was generated. More...
 
const log4cplus::tstringgetThread2 () const
 The alternative name of thread in which this logging event was generated. More...
 
const log4cplus::helpers::TimegetTimestamp () const
 The number of milliseconds elapsed from 1/1/1970 until logging event was created. More...
 
const log4cplus::tstringgetFile () const
 The is the file where this log statement was written.
 
int getLine () const
 The is the line where this log statement was written.
 
log4cplus::tstring const & getFunction () const
 
void gatherThreadSpecificData () const
 
void swap (InternalLoggingEvent &)
 
log4cplus::spi::InternalLoggingEventoperator= (const log4cplus::spi::InternalLoggingEvent &rhs)
 

Static Public Member Functions

static unsigned int getDefaultType ()
 

Protected Attributes

log4cplus::tstring message
 
log4cplus::tstring loggerName
 
LogLevel ll
 
log4cplus::tstring ndc
 
MappedDiagnosticContextMap mdc
 
log4cplus::tstring thread
 
log4cplus::tstring thread2
 
log4cplus::helpers::Time timestamp
 
log4cplus::tstring file
 
log4cplus::tstring function
 
int line
 
bool threadCached
 Indicates whether or not the Threadname has been retrieved. More...
 
bool thread2Cached
 
bool ndcCached
 Indicates whether or not the NDC has been retrieved. More...
 
bool mdcCached
 Indicates whether or not the MDC has been retrieved. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

dcmtk::log4cplus::spi::InternalLoggingEvent::InternalLoggingEvent ( const log4cplus::tstring logger,
LogLevel  loglevel,
const log4cplus::tstring message,
const char *  filename,
int  line 
)

Instantiate a LoggingEvent from the supplied parameters.

Parameters
loggerThe logger of this event.
loglevelThe LogLevel of this event.
messageThe message of this event.
filenameName of file where this event has occurred, can be NULL.
lineLine number in file specified by the filename parameter.

Member Function Documentation

virtual OFauto_ptr<InternalLoggingEvent> dcmtk::log4cplus::spi::InternalLoggingEvent::clone ( ) const
virtual

Returns a copy of this object.

Derived classes should override this method.

const log4cplus::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 log4cplus::tstring& dcmtk::log4cplus::spi::InternalLoggingEvent::getMessage ( ) const
virtual

The application supplied message of logging event.

const log4cplus::tstring& dcmtk::log4cplus::spi::InternalLoggingEvent::getNDC ( ) const
inline

The nested diagnostic context (NDC) of logging event.

const log4cplus::tstring& dcmtk::log4cplus::spi::InternalLoggingEvent::getThread ( ) const
inline

The name of thread in which this logging event was generated.

const log4cplus::tstring& dcmtk::log4cplus::spi::InternalLoggingEvent::getThread2 ( ) const
inline

The alternative name of thread in which this logging event was generated.

const log4cplus::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.)

Member Data Documentation

bool dcmtk::log4cplus::spi::InternalLoggingEvent::mdcCached
mutableprotected

Indicates whether or not the MDC has been retrieved.

bool dcmtk::log4cplus::spi::InternalLoggingEvent::ndcCached
mutableprotected

Indicates whether or not the NDC has been retrieved.

bool dcmtk::log4cplus::spi::InternalLoggingEvent::threadCached
mutableprotected

Indicates whether or not the Threadname has been retrieved.


The documentation for this class was generated from the following file:


Generated on Tue Nov 26 2013 for DCMTK Version 3.6.1 20131114 by Doxygen 1.8.5