log4cplus  2.1.0
Public Member Functions | Public Attributes | Protected Types | Protected Attributes | List of all members
log4cplus::helpers::AppenderAttachableImpl Class Reference

This Interface is for attaching Appenders to objects. More...

#include <appenderattachableimpl.h>

Inheritance diagram for log4cplus::helpers::AppenderAttachableImpl:
[legend]
Collaboration diagram for log4cplus::helpers::AppenderAttachableImpl:
[legend]

Public Member Functions

 AppenderAttachableImpl ()
 
virtual ~AppenderAttachableImpl ()
 
virtual void addAppender (SharedAppenderPtr newAppender)
 Add an appender. More...
 
virtual SharedAppenderPtrList getAllAppenders ()
 Get all previously added appenders as an vectory. More...
 
virtual SharedAppenderPtr getAppender (const log4cplus::tstring &name)
 Look for an attached appender named as name. More...
 
virtual void removeAllAppenders ()
 Remove all previously added appenders. More...
 
virtual void removeAppender (SharedAppenderPtr appender)
 Remove the appender passed as parameter from the list of appenders. More...
 
virtual void removeAppender (const log4cplus::tstring &name)
 Remove the appender with the name passed as parameter from the list of appenders. More...
 
int appendLoopOnAppenders (const spi::InternalLoggingEvent &event) const
 Call the doAppend method on all attached appenders. More...
 
- Public Member Functions inherited from log4cplus::spi::AppenderAttachable
virtual ~AppenderAttachable ()=0
 

Public Attributes

thread::Mutex appender_list_mutex
 

Protected Types

typedef std::vector< SharedAppenderPtrListType
 

Protected Attributes

ListType appenderList
 Array of appenders. More...
 

Detailed Description

This Interface is for attaching Appenders to objects.

Definition at line 48 of file appenderattachableimpl.h.

Member Typedef Documentation

◆ ListType

Definition at line 104 of file appenderattachableimpl.h.

Constructor & Destructor Documentation

◆ AppenderAttachableImpl()

log4cplus::helpers::AppenderAttachableImpl::AppenderAttachableImpl ( )

◆ ~AppenderAttachableImpl()

virtual log4cplus::helpers::AppenderAttachableImpl::~AppenderAttachableImpl ( )
virtual

Member Function Documentation

◆ addAppender()

virtual void log4cplus::helpers::AppenderAttachableImpl::addAppender ( SharedAppenderPtr  newAppender)
virtual

Add an appender.

If the appender is already in the list in won't be added again.

Implements log4cplus::spi::AppenderAttachable.

◆ appendLoopOnAppenders()

int log4cplus::helpers::AppenderAttachableImpl::appendLoopOnAppenders ( const spi::InternalLoggingEvent event) const

Call the doAppend method on all attached appenders.


◆ getAllAppenders()

virtual SharedAppenderPtrList log4cplus::helpers::AppenderAttachableImpl::getAllAppenders ( )
virtual

Get all previously added appenders as an vectory.

Implements log4cplus::spi::AppenderAttachable.

◆ getAppender()

virtual SharedAppenderPtr log4cplus::helpers::AppenderAttachableImpl::getAppender ( const log4cplus::tstring name)
virtual

Look for an attached appender named as name.

Return the appender with that name if in the list. Return null otherwise.

Implements log4cplus::spi::AppenderAttachable.

◆ removeAllAppenders()

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

Remove all previously added appenders.

Implements log4cplus::spi::AppenderAttachable.

◆ removeAppender() [1/2]

virtual void log4cplus::helpers::AppenderAttachableImpl::removeAppender ( const log4cplus::tstring name)
virtual

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


Implements log4cplus::spi::AppenderAttachable.

◆ removeAppender() [2/2]

virtual void log4cplus::helpers::AppenderAttachableImpl::removeAppender ( SharedAppenderPtr  appender)
virtual

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

Implements log4cplus::spi::AppenderAttachable.

Member Data Documentation

◆ appender_list_mutex

thread::Mutex log4cplus::helpers::AppenderAttachableImpl::appender_list_mutex

Definition at line 53 of file appenderattachableimpl.h.

◆ appenderList

ListType log4cplus::helpers::AppenderAttachableImpl::appenderList
protected

Array of appenders.

Definition at line 108 of file appenderattachableimpl.h.


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