Apache log4cxx Version @version@

Public Member Functions | Protected Attributes | List of all members
AppenderAttachableImpl Class Reference

`#include <appenderattachableimpl.h>`

Inheritance diagram for AppenderAttachableImpl:

## Public Member Functions
| AppenderAttachableImpl (Pool &pool)
| Create new instance. More...
void | addRef () const
void | releaseRef () const
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...
const log4cxx::helpers::Mutex & | getMutex () const
Public Member Functions inherited from AppenderAttachable
virtual void | addAppender (const AppenderPtr &newAppender)=0
| Add an appender. More...
virtual AppenderList | getAllAppenders () const =0
| Get all previously added appenders as an AppenderList. More...
virtual AppenderPtr | getAppender (const LogString &name) const =0
| Get an appender by name. More...
virtual bool | isAttached (const AppenderPtr &appender) const =0
| Returns `true` if the specified appender is in list of attached appenders, `false` otherwise. More...
virtual void | removeAllAppenders ()=0
| Remove all previously added appenders. More...
virtual void | removeAppender (const AppenderPtr &appender)=0
| Remove the appender passed as parameter from the list of appenders. More...
virtual void | removeAppender (const LogString &name)=0
| Remove the appender with the name passed as parameter from the list of appenders. More...
virtual | ~AppenderAttachable ()
Public Member Functions inherited from Object
virtual const helpers::Class & | getClass () const
virtual | ~Object ()
virtual void | addRef () const =0
virtual void | releaseRef () const =0
virtual bool | instanceof (const Class &clazz) const =0
virtual const void * | cast (const Class &clazz) const =0
Public Member Functions inherited from ObjectImpl
| ObjectImpl ()
virtual | ~ObjectImpl ()
void | addRef () const
void | releaseRef () const

## Protected Attributes
AppenderList | appenderList
| Array of appenders. More...
Protected Attributes inherited from ObjectImpl
unsigned int volatile | ref

## Additional Inherited Members
Static Public Member Functions inherited from Object
static const helpers::Class & | getStaticClass ()
static const log4cxx::helpers::ClassRegistration & | registerClass ()

## Constructor & Destructor Documentation

## ◆ AppenderAttachableImpl()

AppenderAttachableImpl | ( | Pool & | pool | ) |

Create new instance.

Parameters

  pool | pool, must be longer-lived than instance.

## Member Function Documentation

## ◆ addAppender()

virtual void addAppender | ( | const AppenderPtr & | newAppender | ) |
| virtual

Add an appender.

Implements AppenderAttachable.

## ◆ addRef()

void addRef | ( |  | ) | const
| virtual

Implements Object.

## ◆ appendLoopOnAppenders()

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

Call the `doAppend` method on all attached appenders.

## ◆ getAllAppenders()

virtual AppenderList getAllAppenders | ( |  | ) | const
| virtual

Get all previously added appenders as an Enumeration.

Implements AppenderAttachable.

## ◆ getAppender()

virtual AppenderPtr getAppender | ( | const LogString & | name | ) | const
| virtual

Get an appender by name.

Implements AppenderAttachable.

## ◆ getMutex()

const log4cxx::helpers::Mutex & getMutex | ( |  | ) | const
| inline

## ◆ isAttached()

virtual bool isAttached | ( | const AppenderPtr & | appender | ) | const
| virtual

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

Implements AppenderAttachable.

## ◆ releaseRef()

void releaseRef | ( |  | ) | const
| virtual

Implements Object.

## ◆ removeAllAppenders()

virtual void removeAllAppenders | ( |  | ) |
| virtual

Remove all previously added appenders.

Implements AppenderAttachable.

## ◆ removeAppender() [1/2]

virtual void removeAppender | ( | const AppenderPtr & | appender | ) |
| virtual

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

Implements AppenderAttachable.

## ◆ removeAppender() [2/2]

virtual void removeAppender | ( | const LogString & | name | ) |
| virtual

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

Implements AppenderAttachable.

## Member Data Documentation

## ◆ appenderList

AppenderList appenderList
| protected

Array of appenders.

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

- appenderattachableimpl.h