log4cpp::Appender Class Reference

#include <Appender.hh>

Inheritance diagram for log4cpp::Appender:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void close ()=0
virtual void close ()=0
virtual void doAppend (const LoggingEvent &event)=0
virtual void doAppend (const LoggingEvent &event)=0
virtual FiltergetFilter ()=0
virtual FiltergetFilter ()=0
const std::string & getName () const
const std::string & getName () const
virtual Priority::Value getThreshold ()=0
virtual Priority::Value getThreshold ()=0
virtual bool reopen ()=0
virtual bool reopen ()=0
virtual bool requiresLayout () const =0
virtual bool requiresLayout () const =0
virtual void setFilter (Filter *filter)=0
virtual void setFilter (Filter *filter)=0
virtual void setLayout (Layout *layout)=0
virtual void setLayout (Layout *layout)=0
virtual void setThreshold (Priority::Value priority)=0
virtual void setThreshold (Priority::Value priority)=0
virtual ~Appender ()
virtual ~Appender ()

Static Public Member Functions

static void closeAll ()
static void closeAll ()
static AppendergetAppender (const std::string &name)
static AppendergetAppender (const std::string &name)
static bool reopenAll ()
static bool reopenAll ()

Protected Member Functions

 Appender (const std::string &name)
 Appender (const std::string &name)

Private Types

typedef std::map< std::string,
Appender * > 
AppenderMap
typedef std::map< std::string,
Appender * > 
AppenderMap

Static Private Member Functions

static void _addAppender (Appender *appender)
static void _addAppender (Appender *appender)
static void _deleteAllAppenders ()
static void _deleteAllAppenders ()
static AppenderMap_getAllAppenders ()
static AppenderMap_getAllAppenders ()
static void _removeAppender (Appender *appender)
static void _removeAppender (Appender *appender)

Private Attributes

const std::string _name

Static Private Attributes

static AppenderMap_allAppenders = 0
static threading::Mutex _appenderMapMutex

Detailed Description

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

Definition at line 33 of file include/log4cpp/Appender.hh.


Member Typedef Documentation

typedef std::map<std::string, Appender*> log4cpp::Appender::AppenderMap [private]

Definition at line 134 of file install/include/log4cpp/Appender.hh.

typedef std::map<std::string, Appender*> log4cpp::Appender::AppenderMap [private]

Definition at line 134 of file include/log4cpp/Appender.hh.


Constructor & Destructor Documentation

log4cpp::Appender::Appender ( const std::string &  name  )  [protected]

Constructor for Appender. Will only be used in getAppender() (and in derived classes of course).

Parameters:
name The name of this Appender.

Definition at line 72 of file Appender.cpp.

log4cpp::Appender::~Appender (  )  [virtual]

Destructor for Appender.

Definition at line 77 of file Appender.cpp.

log4cpp::Appender::Appender ( const std::string &  name  )  [protected]

Constructor for Appender. Will only be used in getAppender() (and in derived classes of course).

Parameters:
name The name of this Appender.
virtual log4cpp::Appender::~Appender (  )  [virtual]

Destructor for Appender.


Member Function Documentation

static void log4cpp::Appender::_addAppender ( Appender appender  )  [static, private]
void log4cpp::Appender::_addAppender ( Appender appender  )  [static, private]

Definition at line 32 of file Appender.cpp.

static void log4cpp::Appender::_deleteAllAppenders (  )  [static, private]
void log4cpp::Appender::_deleteAllAppenders (  )  [static, private]

Definition at line 62 of file Appender.cpp.

static AppenderMap& log4cpp::Appender::_getAllAppenders (  )  [static, private]
Appender::AppenderMap & log4cpp::Appender::_getAllAppenders (  )  [static, private]

Definition at line 18 of file Appender.cpp.

static void log4cpp::Appender::_removeAppender ( Appender appender  )  [static, private]
void log4cpp::Appender::_removeAppender ( Appender appender  )  [static, private]

Definition at line 38 of file Appender.cpp.

virtual void log4cpp::Appender::close (  )  [pure virtual]
virtual void log4cpp::Appender::close (  )  [pure virtual]
static void log4cpp::Appender::closeAll (  )  [static]

Call reopen() on all existing Appenders.

Returns:
true if all Appenders returned true on their reopen() call.
void log4cpp::Appender::closeAll (  )  [static]

Call reopen() on all existing Appenders.

Returns:
true if all Appenders returned true on their reopen() call.

Definition at line 54 of file Appender.cpp.

virtual void log4cpp::Appender::doAppend ( const LoggingEvent event  )  [pure virtual]

Log in Appender specific way.

Parameters:
event The LoggingEvent to log.

Implemented in log4cpp::AppenderSkeleton, and log4cpp::AppenderSkeleton.

virtual void log4cpp::Appender::doAppend ( const LoggingEvent event  )  [pure virtual]

Log in Appender specific way.

Parameters:
event The LoggingEvent to log.

Implemented in log4cpp::AppenderSkeleton, and log4cpp::AppenderSkeleton.

static Appender* log4cpp::Appender::getAppender ( const std::string &  name  )  [static]

Get a pointer to an exitsing Appender.

Parameters:
name The name of the Appender to return.
Returns:
a pointer to an existing Appender, or NULL if no appender with the specfied name exists.
Appender * log4cpp::Appender::getAppender ( const std::string &  name  )  [static]

Get a pointer to an exitsing Appender.

Parameters:
name The name of the Appender to return.
Returns:
a pointer to an existing Appender, or NULL if no appender with the specfied name exists.

Definition at line 25 of file Appender.cpp.

virtual Filter* log4cpp::Appender::getFilter (  )  [pure virtual]

Get the Filter for this appender.

Returns:
the filter, or NULL if no filter has been set.

Implemented in log4cpp::AppenderSkeleton, and log4cpp::AppenderSkeleton.

virtual Filter* log4cpp::Appender::getFilter (  )  [pure virtual]

Get the Filter for this appender.

Returns:
the filter, or NULL if no filter has been set.

Implemented in log4cpp::AppenderSkeleton, and log4cpp::AppenderSkeleton.

const std::string& log4cpp::Appender::getName (  )  const [inline]

Get the name of this appender. The name identifies the appender.

Returns:
the name of the appender.

Definition at line 106 of file install/include/log4cpp/Appender.hh.

const std::string& log4cpp::Appender::getName (  )  const [inline]

Get the name of this appender. The name identifies the appender.

Returns:
the name of the appender.

Definition at line 106 of file include/log4cpp/Appender.hh.

virtual Priority::Value log4cpp::Appender::getThreshold (  )  [pure virtual]

Get the threshold priority of this Appender.

Returns:
the threshold

Implemented in log4cpp::AppenderSkeleton, and log4cpp::AppenderSkeleton.

virtual Priority::Value log4cpp::Appender::getThreshold (  )  [pure virtual]

Get the threshold priority of this Appender.

Returns:
the threshold

Implemented in log4cpp::AppenderSkeleton, and log4cpp::AppenderSkeleton.

virtual bool log4cpp::Appender::reopen (  )  [pure virtual]
virtual bool log4cpp::Appender::reopen (  )  [pure virtual]
static bool log4cpp::Appender::reopenAll (  )  [static]

Call reopen() on all existing Appenders.

Returns:
true if all Appenders returned true on their reopen() call.
bool log4cpp::Appender::reopenAll (  )  [static]

Call reopen() on all existing Appenders.

Returns:
true if all Appenders returned true on their reopen() call.

Definition at line 43 of file Appender.cpp.

virtual bool log4cpp::Appender::requiresLayout (  )  const [pure virtual]

Check if the appender uses a layout.

Returns:
true if the appender implementation requires a layout.

Implemented in log4cpp::AbortAppender, log4cpp::AppenderSkeleton, log4cpp::IdsaAppender, log4cpp::LayoutAppender, log4cpp::AbortAppender, log4cpp::AppenderSkeleton, log4cpp::IdsaAppender, and log4cpp::LayoutAppender.

virtual bool log4cpp::Appender::requiresLayout (  )  const [pure virtual]

Check if the appender uses a layout.

Returns:
true if the appender implementation requires a layout.

Implemented in log4cpp::AbortAppender, log4cpp::AppenderSkeleton, log4cpp::IdsaAppender, log4cpp::LayoutAppender, log4cpp::AbortAppender, log4cpp::AppenderSkeleton, log4cpp::IdsaAppender, and log4cpp::LayoutAppender.

virtual void log4cpp::Appender::setFilter ( Filter filter  )  [pure virtual]

Set a Filter for this appender.

Implemented in log4cpp::AppenderSkeleton, and log4cpp::AppenderSkeleton.

virtual void log4cpp::Appender::setFilter ( Filter filter  )  [pure virtual]

Set a Filter for this appender.

Implemented in log4cpp::AppenderSkeleton, and log4cpp::AppenderSkeleton.

virtual void log4cpp::Appender::setLayout ( Layout layout  )  [pure virtual]
virtual void log4cpp::Appender::setLayout ( Layout layout  )  [pure virtual]
virtual void log4cpp::Appender::setThreshold ( Priority::Value  priority  )  [pure virtual]

Set the threshold priority of this Appender. The Appender will not appender LoggingEvents with a priority lower than the threshold. Use Priority::NOTSET to disable threshold checking.

Parameters:
priority The priority to set.

Implemented in log4cpp::AppenderSkeleton, and log4cpp::AppenderSkeleton.

virtual void log4cpp::Appender::setThreshold ( Priority::Value  priority  )  [pure virtual]

Set the threshold priority of this Appender. The Appender will not appender LoggingEvents with a priority lower than the threshold. Use Priority::NOTSET to disable threshold checking.

Parameters:
priority The priority to set.

Implemented in log4cpp::AppenderSkeleton, and log4cpp::AppenderSkeleton.


Member Data Documentation

Definition at line 136 of file include/log4cpp/Appender.hh.

Definition at line 137 of file include/log4cpp/Appender.hh.

const std::string log4cpp::Appender::_name [private]

Definition at line 144 of file include/log4cpp/Appender.hh.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


log4cpp
Author(s): Stephen Roderick
autogenerated on Fri Jan 11 09:51:54 2013