|
log4cplus 2.0.8
|
The internal representation of logging events. More...
#include <loggingevent.h>
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. | |
| bool | thread2Cached |
| bool | ndcCached |
| Indicates whether or not the NDC has been retrieved. | |
| bool | mdcCached |
| Indicates whether or not the MDC 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.
Definition at line 51 of file loggingevent.h.
| log4cplus::spi::InternalLoggingEvent::InternalLoggingEvent | ( | const log4cplus::tstring & | logger, |
| LogLevel | loglevel, | ||
| const log4cplus::tstring & | message, | ||
| const char * | filename, | ||
| int | line, | ||
| const char * | function = nullptr ) |
Instantiate a LoggingEvent from the supplied parameters.
| logger | The logger of this event. |
| loglevel | 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 | Name of function that is logging this event. |
References function, line, and message.
Referenced by clone(), InternalLoggingEvent(), InternalLoggingEvent(), InternalLoggingEvent(), swap(), and ~InternalLoggingEvent().
| log4cplus::spi::InternalLoggingEvent::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, | ||
| const log4cplus::tstring & | function = log4cplus::tstring() ) |
| log4cplus::spi::InternalLoggingEvent::InternalLoggingEvent | ( | const log4cplus::tstring & | logger, |
| LogLevel | loglevel, | ||
| const log4cplus::tstring & | ndc, | ||
| MappedDiagnosticContextMap const & | mdc, | ||
| const log4cplus::tstring & | message, | ||
| const log4cplus::tstring & | thread, | ||
| const log4cplus::tstring & | thread2, | ||
| log4cplus::helpers::Time | time, | ||
| const log4cplus::tstring & | file, | ||
| int | line, | ||
| const log4cplus::tstring & | function = log4cplus::tstring() ) |
| log4cplus::spi::InternalLoggingEvent::InternalLoggingEvent | ( | ) |
References InternalLoggingEvent().
| log4cplus::spi::InternalLoggingEvent::InternalLoggingEvent | ( | const log4cplus::spi::InternalLoggingEvent & | rhs | ) |
References InternalLoggingEvent().
|
virtual |
References InternalLoggingEvent().
|
virtual |
Returns a copy of this object.
Derived classes should override this method.
References clone(), and InternalLoggingEvent().
Referenced by clone().
| void log4cplus::spi::InternalLoggingEvent::gatherThreadSpecificData | ( | ) | const |
|
static |
|
inline |
The is the file where this log statement was written.
Definition at line 190 of file loggingevent.h.
References file.
|
inline |
Definition at line 198 of file loggingevent.h.
References function.
|
inline |
The is the line where this log statement was written.
Definition at line 196 of file loggingevent.h.
References line.
|
inline |
The logger of the logging event.
It is set by the LoggingEvent constructor.
Definition at line 125 of file loggingevent.h.
References getLoggerName(), and loggerName.
Referenced by getLoggerName().
|
inline |
|
inline |
Definition at line 147 of file loggingevent.h.
References log4cplus::MDC::getContext(), log4cplus::getMDC(), mdc, and mdcCached.
|
virtual |
The application supplied message of logging event.
References getMessage().
Referenced by getMessage().
|
inline |
The nested diagnostic context (NDC) of logging event.
Definition at line 137 of file loggingevent.h.
References log4cplus::NDC::get(), log4cplus::getNDC(), ndc, and ndcCached.
|
inline |
The name of thread in which this logging event was generated.
Definition at line 160 of file loggingevent.h.
References log4cplus::thread::getCurrentThreadName(), thread, and threadCached.
|
inline |
The alternative name of thread in which this logging event was generated.
Definition at line 172 of file loggingevent.h.
References log4cplus::thread::getCurrentThreadName2(), thread2, and thread2Cached.
|
inline |
Time stamp when the event was created.
Definition at line 184 of file loggingevent.h.
References timestamp.
|
virtual |
Returns the 'type' of InternalLoggingEvent.
Derived classes should override this method. (NOTE: Values <= 1000 are reserved for log4cplus and should not be used.)
References getType().
Referenced by getType().
| log4cplus::spi::InternalLoggingEvent & log4cplus::spi::InternalLoggingEvent::operator= | ( | const log4cplus::spi::InternalLoggingEvent & | rhs | ) |
| void log4cplus::spi::InternalLoggingEvent::setFunction | ( | char const * | func | ) |
References setFunction().
Referenced by setFunction(), and setFunction().
| void log4cplus::spi::InternalLoggingEvent::setFunction | ( | log4cplus::tstring const & | ) |
References setFunction().
| void log4cplus::spi::InternalLoggingEvent::setLoggingEvent | ( | const log4cplus::tstring & | logger, |
| LogLevel | ll, | ||
| const log4cplus::tstring & | message, | ||
| const char * | filename, | ||
| int | line, | ||
| const char * | function = nullptr ) |
References function, line, ll, message, and setLoggingEvent().
Referenced by setLoggingEvent().
| void log4cplus::spi::InternalLoggingEvent::swap | ( | InternalLoggingEvent & | ) |
References InternalLoggingEvent().
|
protected |
Definition at line 224 of file loggingevent.h.
Referenced by getFile(), InternalLoggingEvent(), and InternalLoggingEvent().
|
protected |
Definition at line 225 of file loggingevent.h.
Referenced by getFunction(), InternalLoggingEvent(), InternalLoggingEvent(), InternalLoggingEvent(), and setLoggingEvent().
|
protected |
Definition at line 226 of file loggingevent.h.
Referenced by getLine(), InternalLoggingEvent(), InternalLoggingEvent(), InternalLoggingEvent(), and setLoggingEvent().
|
protected |
Definition at line 218 of file loggingevent.h.
Referenced by getLogLevel(), and setLoggingEvent().
|
protected |
Definition at line 217 of file loggingevent.h.
Referenced by getLoggerName().
|
mutableprotected |
Definition at line 220 of file loggingevent.h.
Referenced by getMDCCopy(), InternalLoggingEvent(), and InternalLoggingEvent().
|
mutableprotected |
Indicates whether or not the MDC has been retrieved.
Definition at line 233 of file loggingevent.h.
Referenced by getMDCCopy().
|
protected |
Definition at line 216 of file loggingevent.h.
Referenced by InternalLoggingEvent(), InternalLoggingEvent(), InternalLoggingEvent(), and setLoggingEvent().
|
mutableprotected |
Definition at line 219 of file loggingevent.h.
Referenced by getNDC(), InternalLoggingEvent(), and InternalLoggingEvent().
|
mutableprotected |
Indicates whether or not the NDC has been retrieved.
Definition at line 231 of file loggingevent.h.
Referenced by getNDC().
|
mutableprotected |
Definition at line 221 of file loggingevent.h.
Referenced by getThread(), InternalLoggingEvent(), and InternalLoggingEvent().
|
mutableprotected |
Definition at line 222 of file loggingevent.h.
Referenced by getThread2(), and InternalLoggingEvent().
|
mutableprotected |
Definition at line 229 of file loggingevent.h.
Referenced by getThread2().
|
mutableprotected |
Indicates whether or not the Threadname has been retrieved.
Definition at line 228 of file loggingevent.h.
Referenced by getThread().
|
protected |
Definition at line 223 of file loggingevent.h.
Referenced by getTimestamp().