OFFIS DCMTK
Version 3.6.0
|
Extend this class for implementing your own strategies for printing log statements. More...
Public Member Functions | |
Appender (const log4cplus::helpers::Properties properties) | |
void | destructorImpl () |
virtual void | close ()=0 |
Release any resources allocated within the appender such as file handles, network connections, etc. | |
void | doAppend (const log4cplus::spi::InternalLoggingEvent &event) |
This method performs threshold checks and invokes filters before delegating actual logging to the subclasses specific append method. | |
virtual log4cplus::tstring | getName () |
Get the name of this appender. | |
virtual void | setName (const log4cplus::tstring &name) |
Set the name of this appender. | |
virtual void | setErrorHandler (OFauto_ptr< ErrorHandler > eh) |
Set the ErrorHandler for this Appender. | |
virtual ErrorHandler * | getErrorHandler () |
Return the currently set ErrorHandler for this Appender. | |
virtual void | setLayout (OFauto_ptr< Layout > layout) |
Set the layout for this appender. | |
virtual Layout * | getLayout () |
Returns the layout of this appender. | |
void | setFilter (log4cplus::spi::FilterPtr f) |
Set the filter chain on this Appender. | |
log4cplus::spi::FilterPtr | getFilter () const |
Get the filter chain on this Appender. | |
LogLevel | getThreshold () const |
Returns this appenders threshold LogLevel. | |
void | setThreshold (LogLevel th) |
Set the threshold LogLevel. | |
bool | isAsSevereAsThreshold (LogLevel ll) const |
Check whether the message LogLevel is below the appender's threshold. | |
![]() | |
void | addReference () const |
void | removeReference () const |
Protected Member Functions | |
virtual void | append (const log4cplus::spi::InternalLoggingEvent &event)=0 |
Subclasses of Appender should implement this method to perform actual logging. | |
![]() | |
SharedObject (const SharedObject &) | |
SharedObject & | operator= (const SharedObject &) |
![]() | |
LogLogUser (const LogLogUser &) | |
LogLog & | getLogLog () const |
LogLogUser & | operator= (const LogLogUser &rhs) |
Protected Attributes | |
OFauto_ptr< Layout > | layout |
The layout variable does not need to be set if the appender implementation has its own layout. | |
log4cplus::tstring | name |
Appenders are named. | |
LogLevel | threshold |
There is no LogLevel threshold filtering by default. | |
log4cplus::spi::FilterPtr | filter |
The first filter in the filter chain. | |
OFauto_ptr< ErrorHandler > | errorHandler |
It is assumed and enforced that errorHandler is never null. | |
bool | closed |
Is this appender closed? | |
Additional Inherited Members | |
![]() | |
LOG4CPLUS_MUTEX_PTR_DECLARE | access_mutex |
Extend this class for implementing your own strategies for printing log statements.
Definition at line 73 of file appender.h.
|
protectedpure virtual |
|
pure virtual |
Release any resources allocated within the appender such as file handles, network connections, etc.
It is a programming error to append to a closed appender.
|
virtual |
Returns the layout of this appender.
The value may be NULL.
This class owns the returned pointer.
|
virtual |
Get the name of this appender.
The name uniquely identifies the appender.
|
inline |
Returns this appenders threshold LogLevel.
See the setThreshold method for the meaning of this option.
Definition at line 155 of file appender.h.
|
inline |
Check whether the message LogLevel is below the appender's threshold.
If there is no threshold set, then the return value is always true
.
Definition at line 172 of file appender.h.
|
virtual |
Set the layout for this appender.
Note that some appenders have their own (fixed) layouts or do not use one. For example, the SocketAppender ignores the layout set here.
|
virtual |
Set the name of this appender.
The name is used by other components to identify this appender.
|
inline |
Set the threshold LogLevel.
All log events with lower LogLevel than the threshold LogLevel are ignored by the appender.
In configuration files this option is specified by setting the value of the Threshold option to a LogLevel string, such as "DEBUG", "INFO" and so on.
Definition at line 165 of file appender.h.
|
protected |
It is assumed and enforced that errorHandler is never null.
Definition at line 201 of file appender.h.
|
protected |
The first filter in the filter chain.
Set to null
initially.
Definition at line 198 of file appender.h.
|
protected |
The layout variable does not need to be set if the appender implementation has its own layout.
Definition at line 188 of file appender.h.
|
protected |
Appenders are named.
Definition at line 191 of file appender.h.
|
protected |
There is no LogLevel threshold filtering by default.
Definition at line 194 of file appender.h.