Extend this class for implementing your own strategies for printing log statements.
More...
|
|
OFunique_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.
|
|
OFunique_ptr< ErrorHandler > | errorHandler |
| | It is assumed and enforced that errorHandler is never null.
|
|
OFunique_ptr< helpers::LockFile > | lockFile |
| | Optional system wide synchronization lock.
|
| bool | useLockFile |
|
bool | closed |
| | Is this appender closed?
|
Extend this class for implementing your own strategies for printing log statements.
Properties
- UseLockFile
- Set this property to true if you want your output through this appender to be synchronized between multiple processes. When this property is set to true then log4cplus uses OS specific facilities (e.g.,
lockf()) to provide inter-process locking. With the exception of FileAppender and its derived classes, it is also necessary to provide path to a lock file using the LockFile property. - See also
- FileAppender
- LockFile
- This property specifies lock file, file used for inter-process synchronization of log file access. The property is only used when UseLockFile is set to true. Then it is mandatory.
- See also
- FileAppender
◆ append()
Subclasses of Appender should implement this method to perform actual logging.
- See also
- doAppend method.
◆ close()
| virtual void dcmtk::log4cplus::Appender::close |
( |
| ) |
|
|
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.
◆ getLayout()
| virtual Layout * dcmtk::log4cplus::Appender::getLayout |
( |
| ) |
|
|
virtual |
Returns the layout of this appender.
The value may be NULL.
This class owns the returned pointer.
◆ getName()
| virtual log4cplus::tstring dcmtk::log4cplus::Appender::getName |
( |
| ) |
|
|
virtual |
Get the name of this appender.
The name uniquely identifies the appender.
◆ getThreshold()
| LogLevel dcmtk::log4cplus::Appender::getThreshold |
( |
| ) |
const |
|
inline |
◆ isAsSevereAsThreshold()
| bool dcmtk::log4cplus::Appender::isAsSevereAsThreshold |
( |
LogLevel | ll | ) |
const |
|
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.
References threshold.
◆ setLayout()
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.
References layout.
◆ setName()
| virtual void dcmtk::log4cplus::Appender::setName |
( |
const log4cplus::tstring & | name | ) |
|
|
virtual |
Set the name of this appender.
The name is used by other components to identify this appender.
References name.
◆ setThreshold()
| void dcmtk::log4cplus::Appender::setThreshold |
( |
LogLevel | th | ) |
|
|
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.
References threshold.
◆ filter
| log4cplus::spi::FilterPtr dcmtk::log4cplus::Appender::filter |
|
protected |
◆ useLockFile
| bool dcmtk::log4cplus::Appender::useLockFile |
|
protected |
Use lock file for inter-process synchronization of access to log file.
The documentation for this class was generated from the following file: