Apache Log4cxx  Version 2.0.0
Loading...
Searching...
No Matches
log4cxx::Appender Class Referenceabstract

Implement this interface for your own strategies for outputting log statements. More...

#include <appender.h>

Inheritance diagram for log4cxx::Appender:
log4cxx::spi::OptionHandler log4cxx::helpers::Object log4cxx::AppenderSkeleton log4cxx::AsyncAppender log4cxx::WriterAppender log4cxx::db::DBAppender log4cxx::db::ODBCAppender log4cxx::net::SMTPAppender log4cxx::net::SocketAppenderSkeleton log4cxx::net::SyslogAppender log4cxx::net::TelnetAppender log4cxx::nt::NTEventLogAppender log4cxx::nt::OutputDebugStringAppender

Public Member Functions

virtual ~Appender ()
virtual void addFilter (const spi::FilterPtr &newFilter)=0
 Add a filter to the end of the filter list.
virtual spi::FilterPtr getFilter () const =0
 Returns the head Filter.
virtual void clearFilters ()=0
 Clear the list of filters by removing all the filters in it.
virtual void close ()=0
 Release any resources allocated within the appender such as file handles, network connections, etc.
virtual void doAppend (const spi::LoggingEventPtr &event)=0
 Add a formatted equivalent of event to the output.
void doAppend (const spi::LoggingEventPtr &event, helpers::Pool &pool)
virtual LogString getName () const =0
 Get the name of this appender.
virtual void setLayout (const LayoutPtr &layout)=0
 Set the Layout for this appender.
virtual LayoutPtr getLayout () const =0
 Returns this appenders layout.
virtual void setName (const LogString &name)=0
 Set the name of this appender.
virtual bool requiresLayout () const
Public Member Functions inherited from log4cxx::spi::OptionHandler
virtual ~OptionHandler ()
virtual void activateOptions ()=0
 Activate the options that were previously set with calls to option setters.
void activateOptions (helpers::Pool &)
virtual void setOption (const LogString &option, const LogString &value)
 Override this method to set option to value.
Public Member Functions inherited from log4cxx::helpers::Object
virtual ~Object ()
virtual const helpers::Class & getClass () const =0
virtual bool instanceof (const Class &clazz) const =0
virtual const void * cast (const Class &clazz) const =0

Detailed Description

Implement this interface for your own strategies for outputting log statements.

Constructor & Destructor Documentation

◆ ~Appender()

virtual log4cxx::Appender::~Appender ( )
inlinevirtual

Member Function Documentation

◆ addFilter()

virtual void log4cxx::Appender::addFilter ( const spi::FilterPtr & newFilter)
pure virtual

Add a filter to the end of the filter list.

Implemented in log4cxx::AppenderSkeleton.

◆ clearFilters()

virtual void log4cxx::Appender::clearFilters ( )
pure virtual

Clear the list of filters by removing all the filters in it.

Implemented in log4cxx::AppenderSkeleton.

◆ close()

virtual void log4cxx::Appender::close ( )
pure virtual

Release any resources allocated within the appender such as file handles, network connections, etc.

Implemented in log4cxx::AppenderSkeleton.

◆ doAppend() [1/2]

virtual void log4cxx::Appender::doAppend ( const spi::LoggingEventPtr & event)
pure virtual

Add a formatted equivalent of event to the output.

A Logger uses this entry point (via AppenderAttachable::appendLoopOnAppenders) when a logging request is enabled.

Implemented in log4cxx::AppenderSkeleton, and log4cxx::AsyncAppender.

◆ doAppend() [2/2]

void log4cxx::Appender::doAppend ( const spi::LoggingEventPtr & event,
helpers::Pool & pool )
Deprecated
Backward compatability support will be removed in a future version.
Deprecated
Use doAppend() without a Pool parameter instead

◆ getFilter()

virtual spi::FilterPtr log4cxx::Appender::getFilter ( ) const
pure virtual

Returns the head Filter.

The Filters are organized in a linked list and so all Filters on this Appender are available through the result.

Returns
the head Filter or null, if no Filters are present

Implemented in log4cxx::AppenderSkeleton.

◆ getLayout()

virtual LayoutPtr log4cxx::Appender::getLayout ( ) const
pure virtual

Returns this appenders layout.

Implemented in log4cxx::AppenderSkeleton.

◆ getName()

virtual LogString log4cxx::Appender::getName ( ) const
pure virtual

Get the name of this appender.

The name uniquely identifies the appender.

Implemented in log4cxx::AppenderSkeleton.

◆ requiresLayout()

virtual bool log4cxx::Appender::requiresLayout ( ) const
virtual
Deprecated
This method will be removed in a future version.
Deprecated
This method is no longer used by Log4cxx configurators

◆ setLayout()

virtual void log4cxx::Appender::setLayout ( const LayoutPtr & layout)
pure virtual

Set the Layout for this appender.

Implemented in log4cxx::AppenderSkeleton.

◆ setName()

virtual void log4cxx::Appender::setName ( const LogString & name)
pure virtual

Set the name of this appender.

The name is used by other components to identify this appender.

Implemented in log4cxx::AppenderSkeleton.


The documentation for this class was generated from the following file: