18#ifndef _LOG4CXX_APPENDER_SKELETON_H
19#define _LOG4CXX_APPENDER_SKELETON_H
43 LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(AppenderSkeletonPrivate, m_priv)
51 virtual
void append(const spi::LoggingEventPtr& event,
log4cxx::helpers::Pool& p) = 0;
53 void doAppendImpl(const spi::LoggingEventPtr& event,
log4cxx::helpers::Pool& pool);
78 void activateOptions(helpers::Pool& )
override {}
Implementation base class for all appenders.
Definition: appenderskeleton.h:41
LogString getName() const override
Returns the name of this Appender.
void setErrorHandler(const spi::ErrorHandlerPtr eh)
Set the ErrorHandler for this Appender.
spi::FilterPtr getFilter() const override
Returns the head Filter.
void doAppend(const spi::LoggingEventPtr &event, helpers::Pool &pool) override
This method performs threshold checks and invokes filters before delegating actual logging to the sub...
const spi::FilterPtr getFirstFilter() const
Return the first filter in the filter chain for this Appender.
LayoutPtr getLayout() const override
Returns the layout of this appender.
void setOption(const LogString &option, const LogString &value) override
Set option to value.
const LevelPtr getThreshold() const
Returns this appenders threshold level.
void setName(const LogString &name1) override
Set the name of this Appender.
void setLayout(const LayoutPtr layout1) override
Set the layout for this appender.
void setThreshold(const LevelPtr &threshold)
Set the threshold level.
void addFilter(const spi::FilterPtr newFilter) override
Add a filter to end of the filter list.
bool isAsSevereAsThreshold(const LevelPtr &level) const
Check whether the message level is below the appender's threshold.
void clearFilters() override
Clear the filters chain.
const spi::ErrorHandlerPtr getErrorHandler() const
Return the currently set spi::ErrorHandler for this Appender.
Implement this interface for your own strategies for outputting log statements.
Definition: appender.h:51
base class for java-like objects.
Definition: object.h:105
std::shared_ptr< ErrorHandler > ErrorHandlerPtr
Definition: appender.h:38
std::shared_ptr< Filter > FilterPtr
Definition: appender.h:35
std::shared_ptr< LoggingEvent > LoggingEventPtr
Definition: appender.h:32
Definition: configuration.h:25
std::basic_string< logchar > LogString
Definition: logstring.h:60
std::shared_ptr< Level > LevelPtr
Definition: optionconverter.h:28
std::shared_ptr< Layout > LayoutPtr
Definition: appender.h:42
#define LOG4CXX_CAST_ENTRY(Interface)
Definition: object.h:157
#define DECLARE_ABSTRACT_LOG4CXX_OBJECT(object)
Definition: object.h:38
#define END_LOG4CXX_CAST_MAP()
Definition: object.h:151
#define BEGIN_LOG4CXX_CAST_MAP()
Definition: object.h:145