Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | Friends
Appender Class Reference

#include <Appender.hh>

Inheritance diagram for Appender:
Inheritance graph
[legend]

List of all members.

Public Member Functions

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

Static Public Member Functions

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

Protected Member Functions

 Appender (const std::string &name)

Private Types

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

Private Member Functions

Appenderoperator= (const Appender &)

Static Private Member Functions

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

Private Attributes

const std::string _name

Static Private Attributes

static AppenderMap_allAppenders
static threading::Mutex _appenderMapMutex

Friends

class HierarchyMaintainer

Detailed Description

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

Definition at line 33 of file Appender.hh.


Member Typedef Documentation

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

Definition at line 137 of file Appender.hh.


Constructor & Destructor Documentation

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

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

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

Destructor for Appender.


Member Function Documentation

static void Appender::_addAppender ( Appender appender) [static, private]
static void Appender::_deleteAllAppenders ( ) [static, private]
static AppenderMap& Appender::_getAllAppenders ( ) [static, private]
static void Appender::_removeAppender ( Appender appender) [static, private]
virtual void Appender::close ( ) [pure virtual]

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

Implemented in RemoteSyslogAppender, AppenderSkeleton, SyslogAppender, FileAppender, IdsaAppender, StringQueueAppender, AbortAppender, OstreamAppender, and BufferingAppender.

static void Appender::closeAll ( ) [static]

Call reopen() on all existing Appenders.

Returns:
true if all Appenders returned true on their reopen() call.
virtual void Appender::doAppend ( const LoggingEvent event) [pure virtual]

Log in Appender specific way.

Parameters:
eventThe LoggingEvent to log.

Implemented in AppenderSkeleton.

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

Get a pointer to an existing Appender.

Parameters:
nameThe name of the Appender to return.
Returns:
a pointer to an existing Appender, or NULL if no appender with the specified name exists.
virtual Filter* Appender::getFilter ( ) [pure virtual]

Get the Filter for this appender.

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

Implemented in AppenderSkeleton.

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

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

Returns:
the name of the appender.

Definition at line 109 of file Appender.hh.

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

Get the threshold priority of this Appender.

Returns:
the threshold

Implemented in AppenderSkeleton.

Appender& Appender::operator= ( const Appender ) [private]
virtual bool Appender::reopen ( ) [pure virtual]

Reopens the output destination of this Appender, e.g. the logfile or TCP socket.

Returns:
false if an error occurred during reopening, true otherwise.

Implemented in RemoteSyslogAppender, SyslogAppender, AppenderSkeleton, FileAppender, IdsaAppender, StringQueueAppender, AbortAppender, and OstreamAppender.

static bool Appender::reopenAll ( ) [static]

Call reopen() on all existing Appenders.

Returns:
true if all Appenders returned true on their reopen() call.
virtual bool Appender::requiresLayout ( ) const [pure virtual]

Check if the appender uses a layout.

Returns:
true if the appender implementation requires a layout.

Implemented in AppenderSkeleton, IdsaAppender, LayoutAppender, and AbortAppender.

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

Set a Filter for this appender.

Implemented in AppenderSkeleton.

virtual void Appender::setLayout ( Layout layout) [pure virtual]

Set the Layout for this appender.

Parameters:
layoutThe layout to use.

Implemented in AppenderSkeleton, IdsaAppender, AbortAppender, and LayoutAppender.

virtual void 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:
priorityThe priority to set.

Implemented in AppenderSkeleton.


Friends And Related Function Documentation

friend class HierarchyMaintainer [friend]

Definition at line 37 of file Appender.hh.


Member Data Documentation

Definition at line 139 of file Appender.hh.

Definition at line 140 of file Appender.hh.

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

Definition at line 147 of file Appender.hh.


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


rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:09