Apache log4cxx  Version 0.12.0
log4cxx::helpers::AppenderAttachableImpl Class Reference

#include <appenderattachableimpl.h>

Inheritance diagram for log4cxx::helpers::AppenderAttachableImpl:
log4cxx::spi::AppenderAttachable log4cxx::helpers::Object log4cxx::helpers::Object

Public Member Functions

 AppenderAttachableImpl (Pool &pool)
 Create new instance. More...
 
virtual void addAppender (const AppenderPtr newAppender)
 Add an appender. More...
 
int appendLoopOnAppenders (const spi::LoggingEventPtr &event, log4cxx::helpers::Pool &p)
 Call the doAppend method on all attached appenders. More...
 
virtual AppenderList getAllAppenders () const
 Get all previously added appenders as an Enumeration. More...
 
virtual AppenderPtr getAppender (const LogString &name) const
 Get an appender by name. More...
 
virtual bool isAttached (const AppenderPtr appender) const
 Returns true if the specified appender is in the list of attached appenders, false otherwise. More...
 
virtual void removeAllAppenders ()
 Remove all previously added appenders. More...
 
virtual void removeAppender (const AppenderPtr appender)
 Remove the appender passed as parameter from the list of appenders. More...
 
virtual void removeAppender (const LogString &name)
 Remove the appender with the name passed as parameter from the list of appenders. More...
 
std::mutex & getMutex () const
 
- Public Member Functions inherited from log4cxx::spi::AppenderAttachable
virtual ~AppenderAttachable ()
 
- Public Member Functions inherited from log4cxx::helpers::Object
virtual ~Object ()
 
virtual bool instanceof (const Class &clazz) const =0
 
virtual const void * cast (const Class &clazz) const =0
 

Protected Attributes

AppenderList appenderList
 Array of appenders. More...
 

Constructor & Destructor Documentation

◆ AppenderAttachableImpl()

log4cxx::helpers::AppenderAttachableImpl::AppenderAttachableImpl ( Pool pool)

Create new instance.

Parameters
poolpool, must be longer-lived than instance.

Member Function Documentation

◆ addAppender()

virtual void log4cxx::helpers::AppenderAttachableImpl::addAppender ( const AppenderPtr  newAppender)
virtual

Add an appender.

Implements log4cxx::spi::AppenderAttachable.

◆ appendLoopOnAppenders()

int log4cxx::helpers::AppenderAttachableImpl::appendLoopOnAppenders ( const spi::LoggingEventPtr event,
log4cxx::helpers::Pool p 
)

Call the doAppend method on all attached appenders.

◆ getAllAppenders()

virtual AppenderList log4cxx::helpers::AppenderAttachableImpl::getAllAppenders ( ) const
virtual

Get all previously added appenders as an Enumeration.

Implements log4cxx::spi::AppenderAttachable.

◆ getAppender()

virtual AppenderPtr log4cxx::helpers::AppenderAttachableImpl::getAppender ( const LogString name) const
virtual

Get an appender by name.

Implements log4cxx::spi::AppenderAttachable.

◆ getMutex()

std::mutex& log4cxx::helpers::AppenderAttachableImpl::getMutex ( ) const
inline

◆ isAttached()

virtual bool log4cxx::helpers::AppenderAttachableImpl::isAttached ( const AppenderPtr  appender) const
virtual

Returns true if the specified appender is in the list of attached appenders, false otherwise.

Implements log4cxx::spi::AppenderAttachable.

◆ removeAllAppenders()

virtual void log4cxx::helpers::AppenderAttachableImpl::removeAllAppenders ( )
virtual

Remove all previously added appenders.

Implements log4cxx::spi::AppenderAttachable.

◆ removeAppender() [1/2]

virtual void log4cxx::helpers::AppenderAttachableImpl::removeAppender ( const AppenderPtr  appender)
virtual

Remove the appender passed as parameter from the list of appenders.

Implements log4cxx::spi::AppenderAttachable.

◆ removeAppender() [2/2]

virtual void log4cxx::helpers::AppenderAttachableImpl::removeAppender ( const LogString name)
virtual

Remove the appender with the name passed as parameter from the list of appenders.

Implements log4cxx::spi::AppenderAttachable.

Member Data Documentation

◆ appenderList

AppenderList log4cxx::helpers::AppenderAttachableImpl::appenderList
protected

Array of appenders.


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