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 | List of all members
Appender Class Referenceabstract

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

#include <Appender.hh>

Inheritance diagram for Appender:
Inheritance graph
[legend]

Public Member Functions

virtual void close ()=0
 Release any resources allocated within the appender such as file handles, network connections, etc. More...
 
virtual void doAppend (const LoggingEvent &event)=0
 Log in Appender specific way. More...
 
virtual FiltergetFilter ()=0
 Get the Filter for this appender. More...
 
const std::string & getName () const
 Get the name of this appender. More...
 
virtual Priority::Value getThreshold ()=0
 Get the threshold priority of this Appender. More...
 
virtual bool reopen ()=0
 Reopens the output destination of this Appender, e.g. More...
 
virtual bool requiresLayout () const =0
 Check if the appender uses a layout. More...
 
virtual void setFilter (Filter *filter)=0
 Set a Filter for this appender. More...
 
virtual void setLayout (Layout *layout)=0
 Set the Layout for this appender. More...
 
virtual void setThreshold (Priority::Value priority)=0
 Set the threshold priority of this Appender. More...
 
virtual ~Appender ()
 Destructor for Appender. More...
 

Static Public Member Functions

static void closeAll ()
 Call reopen() on all existing Appenders. More...
 
static AppendergetAppender (const std::string &name)
 Get a pointer to an existing Appender. More...
 
static bool reopenAll ()
 Call reopen() on all existing Appenders. More...
 

Protected Member Functions

 Appender (const std::string &name)
 Constructor for Appender. More...
 

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)
staticprivate
static void Appender::_deleteAllAppenders ( )
staticprivate
static AppenderMap& Appender::_getAllAppenders ( )
staticprivate
static void Appender::_removeAppender ( Appender appender)
staticprivate
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

AppenderMap* Appender::_allAppenders
staticprivate

Definition at line 139 of file Appender.hh.

threading::Mutex Appender::_appenderMapMutex
staticprivate

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_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Thu Jun 6 2019 19:10:54