18 #ifndef _LOG4CXX_APPENDER_SKELETON_H
19 #define _LOG4CXX_APPENDER_SKELETON_H
22 #pragma warning ( push )
23 #pragma warning ( disable: 4231 4251 4275 4786 )
77 mutable log4cxx::shared_mutex
mutex;
109 virtual
void activateOptions(
log4cxx::helpers::Pool& ) {}
204 this->layout = layout1;
212 this->name.assign(name1);
229 #if defined(_MSC_VER)
230 #pragma warning ( pop )
Implementation base class for all appenders.
Definition: appenderskeleton.h:46
spi::ErrorHandlerPtr errorHandler
It is assumed and enforced that errorHandler is never null.
Definition: appenderskeleton.h:62
LayoutPtr layout
The layout variable does not need to be set if the appender implementation has its own layout.
Definition: appenderskeleton.h:50
void setErrorHandler(const spi::ErrorHandlerPtr eh)
Set the ErrorHandler for this Appender.
const LevelPtr & getThreshold() const
Returns this appenders threshold level.
Definition: appenderskeleton.h:171
LevelPtr threshold
There is no level threshold filtering by default.
Definition: appenderskeleton.h:57
const spi::FilterPtr & getFirstFilter() const
Return the first filter in the filter chain for this Appender.
Definition: appenderskeleton.h:145
virtual void setOption(const LogString &option, const LogString &value)
Set option to value.
void addFilter(const spi::FilterPtr &newFilter)
Add a filter to end of the filter list.
bool closed
Is this appender closed?
Definition: appenderskeleton.h:74
LogString name
Appenders are named.
Definition: appenderskeleton.h:53
const spi::ErrorHandlerPtr & getErrorHandler() const
Return the currently set spi::ErrorHandler for this Appender.
Definition: appenderskeleton.h:127
LogString getName() const
Returns the name of this Appender.
Definition: appenderskeleton.h:162
spi::FilterPtr getFilter() const
Returns the head Filter.
Definition: appenderskeleton.h:135
virtual void append(const spi::LoggingEventPtr &event, log4cxx::helpers::Pool &p)=0
Subclasses of AppenderSkeleton should implement this method to perform actual logging.
spi::FilterPtr headFilter
The first filter in the filter chain.
Definition: appenderskeleton.h:66
void setLayout(const LayoutPtr &layout1)
Set the layout for this appender.
Definition: appenderskeleton.h:202
void clearFilters()
Clear the filters chain.
void setThreshold(const LevelPtr &threshold)
Set the threshold level.
log4cxx::shared_mutex mutex
Definition: appenderskeleton.h:77
bool isAsSevereAsThreshold(const LevelPtr &level) const
Check whether the message level is below the appender's threshold.
void doAppendImpl(const spi::LoggingEventPtr &event, log4cxx::helpers::Pool &pool)
LayoutPtr getLayout() const
Returns the layout of this appender.
Definition: appenderskeleton.h:153
virtual void doAppend(const spi::LoggingEventPtr &event, log4cxx::helpers::Pool &pool)
This method performs threshold checks and invokes filters before delegating actual logging to the sub...
void setName(const LogString &name1)
Set the name of this Appender.
Definition: appenderskeleton.h:210
spi::FilterPtr tailFilter
The last filter in the filter chain.
Definition: appenderskeleton.h:69
log4cxx::helpers::Pool pool
Definition: appenderskeleton.h:76
Implement this interface for your own strategies for outputting log statements.
Definition: appender.h:57
base class for java-like objects.
Definition: object.h:102
std::shared_ptr< Filter > FilterPtr
Definition: appender.h:40
std::shared_ptr< LoggingEvent > LoggingEventPtr
Definition: appender.h:37
std::shared_ptr< ErrorHandler > ErrorHandlerPtr
Definition: appender.h:43
Definition: appender.h:33
std::basic_string< logchar > LogString
Definition: logstring.h:66
std::shared_ptr< Level > LevelPtr
Definition: optionconverter.h:27
std::shared_ptr< Layout > LayoutPtr
Definition: appender.h:47
#define LOG4CXX_CAST_ENTRY(Interface)
Definition: object.h:148
#define DECLARE_ABSTRACT_LOG4CXX_OBJECT(object)
Definition: object.h:26
#define END_LOG4CXX_CAST_MAP()
Definition: object.h:142
#define BEGIN_LOG4CXX_CAST_MAP()
Definition: object.h:136