OFFIS DCMTK  Version 3.6.0
Public Member Functions | Static Public Member Functions | Protected Attributes | Private Attributes | List of all members
log4cplus::spi::InternalLoggingEvent Class Reference

The internal representation of logging events. More...

Collaboration diagram for log4cplus::spi::InternalLoggingEvent:
[legend]

Public Member Functions

 InternalLoggingEvent (const log4cplus::tstring &logger, LogLevel ll_, const log4cplus::tstring &message_, const char *filename, int line_, const char *function_)
 Instantiate a LoggingEvent from the supplied parameters.
 
 InternalLoggingEvent (const log4cplus::tstring &logger, LogLevel ll_, const log4cplus::tstring &ndc_, const log4cplus::tstring &message_, const log4cplus::tstring &thread_, log4cplus::helpers::Time time, const log4cplus::tstring &file_, int line_, const log4cplus::tstring &function_)
 
 InternalLoggingEvent (const log4cplus::spi::InternalLoggingEvent &rhs)
 
virtual const log4cplus::tstringgetMessage () 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 log4cplus::tstringgetLoggerName () const
 The logger of the logging event.
 
LogLevel getLogLevel () const
 LogLevel of logging event.
 
const log4cplus::tstringgetNDC () const
 The nested diagnostic context (NDC) of logging event.
 
const log4cplus::tstringgetThread () const
 The name of thread in which this logging event was generated.
 
const log4cplus::helpers::TimegetTimestamp () const
 The number of milliseconds elapsed from 1/1/1970 until logging event was created.
 
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.
 
const log4cplus::tstringgetFunction () const
 The is the function where this log statement was written.
 
log4cplus::spi::InternalLoggingEventoperator= (const log4cplus::spi::InternalLoggingEvent &rhs)
 

Static Public Member Functions

static unsigned int getDefaultType ()
 

Protected Attributes

log4cplus::tstring message
 

Private Attributes

log4cplus::tstring loggerName
 
LogLevel ll
 
log4cplus::tstring ndc
 
log4cplus::tstring thread
 
log4cplus::helpers::Time timestamp
 
log4cplus::tstring file
 
int line
 
log4cplus::tstring function
 
bool threadCached
 Indicates whether or not the Threadname has been retrieved.
 
bool ndcCached
 Indicates whether or not the NDC has been retrieved.
 

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.

Definition at line 45 of file logevent.h.

Constructor & Destructor Documentation

log4cplus::spi::InternalLoggingEvent::InternalLoggingEvent ( const log4cplus::tstring logger,
LogLevel  ll_,
const log4cplus::tstring message_,
const char *  filename,
int  line_,
const char *  function_ 
)
inline

Instantiate a LoggingEvent from the supplied parameters.

Parameters
loggerThe logger of this event.
ll_The LogLevel of this event.
message_The message of this event.
filenameName 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

Definition at line 60 of file logevent.h.

Member Function Documentation

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

Returns a copy of this object.

Derived classes should override this method.

const log4cplus::tstring& log4cplus::spi::InternalLoggingEvent::getLoggerName ( ) const
inline

The logger of the logging event.

It is set by the LoggingEvent constructor.

Definition at line 146 of file logevent.h.

LogLevel log4cplus::spi::InternalLoggingEvent::getLogLevel ( ) const
inline

LogLevel of logging event.

Definition at line 149 of file logevent.h.

virtual const log4cplus::tstring& log4cplus::spi::InternalLoggingEvent::getMessage ( ) const
virtual

The application supplied message of logging event.

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

The nested diagnostic context (NDC) of logging event.

Definition at line 152 of file logevent.h.

References log4cplus::NDC::get().

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

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

Definition at line 161 of file logevent.h.

const log4cplus::helpers::Time& log4cplus::spi::InternalLoggingEvent::getTimestamp ( ) const
inline

The number of milliseconds elapsed from 1/1/1970 until logging event was created.

Definition at line 171 of file logevent.h.

virtual unsigned int 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 log4cplus::spi::InternalLoggingEvent::ndcCached
mutableprivate

Indicates whether or not the NDC has been retrieved.

Definition at line 205 of file logevent.h.

bool log4cplus::spi::InternalLoggingEvent::threadCached
mutableprivate

Indicates whether or not the Threadname has been retrieved.

Definition at line 203 of file logevent.h.


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


Generated on Thu Dec 20 2012 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.8.2