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

SyslogAppender sends LoggingEvents to the local syslog system. More...

#include <SyslogAppender.hh>

Inheritance diagram for SyslogAppender:
Inheritance graph
[legend]

Public Member Functions

virtual void close ()
 Calls closelog(3) to close the syslog file descriptor. More...
 
virtual bool reopen ()
 Calls closelog(3) and openlog(3). More...
 
 SyslogAppender (const std::string &name, const std::string &syslogName, int facility=LOG_USER)
 Instantiate a SyslogAppender with given name and name and facility for syslog. More...
 
virtual ~SyslogAppender ()
 
- Public Member Functions inherited from LayoutAppender
 LayoutAppender (const std::string &name)
 
virtual bool requiresLayout () const
 Check if the appender requires a layout. More...
 
virtual void setLayout (Layout *layout=NULL)
 Set the Layout for this appender. More...
 
virtual ~LayoutAppender ()
 
- Public Member Functions inherited from AppenderSkeleton
virtual void doAppend (const LoggingEvent &event)
 Log in Appender specific way. More...
 
virtual FiltergetFilter ()
 Get the Filter for this appender. More...
 
virtual Priority::Value getThreshold ()
 Get the threshold priority of this Appender. More...
 
virtual void setFilter (Filter *filter)
 Set a Filter for this appender. More...
 
virtual void setThreshold (Priority::Value priority)
 Set the threshold priority of this Appender. More...
 
virtual ~AppenderSkeleton ()
 Destructor for AppenderSkeleton. More...
 
- Public Member Functions inherited from Appender
const std::string & getName () const
 Get the name of this appender. More...
 
virtual ~Appender ()
 Destructor for Appender. More...
 

Static Public Member Functions

static int toSyslogPriority (Priority::Value priority)
 Translates a log4cpp priority to a syslog priority. More...
 
- Static Public Member Functions inherited from Appender
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

virtual void _append (const LoggingEvent &event)
 Sends a LoggingEvent to syslog. More...
 
virtual void open ()
 Calls openlog(3). More...
 
- Protected Member Functions inherited from LayoutAppender
Layout_getLayout ()
 Return the layout of the appender. More...
 
- Protected Member Functions inherited from AppenderSkeleton
 AppenderSkeleton (const std::string &name)
 Constructor for AppenderSkeleton. More...
 
- Protected Member Functions inherited from Appender
 Appender (const std::string &name)
 Constructor for Appender. More...
 

Protected Attributes

int _facility
 
const std::string _syslogName
 

Additional Inherited Members

- Public Types inherited from LayoutAppender
typedef BasicLayout DefaultLayoutType
 

Detailed Description

SyslogAppender sends LoggingEvents to the local syslog system.

Definition at line 25 of file SyslogAppender.hh.

Constructor & Destructor Documentation

SyslogAppender::SyslogAppender ( const std::string &  name,
const std::string &  syslogName,
int  facility = LOG_USER 
)

Instantiate a SyslogAppender with given name and name and facility for syslog.

Note that the C syslog API is process global, so instantion of a second SyslogAppender will 'overwrite' the syslog name of the first.

Parameters
nameThe name of the Appender
syslogNameThe ident parameter in the openlog(3) call.
facilityThe syslog facility to log to. Defaults to LOG_USER.
virtual SyslogAppender::~SyslogAppender ( )
virtual

Member Function Documentation

virtual void SyslogAppender::_append ( const LoggingEvent event)
protectedvirtual

Sends a LoggingEvent to syslog.

Parameters
eventthe LoggingEvent to log.

Implements AppenderSkeleton.

virtual void SyslogAppender::close ( )
virtual

Calls closelog(3) to close the syslog file descriptor.

Implements AppenderSkeleton.

virtual void SyslogAppender::open ( )
protectedvirtual

Calls openlog(3).

virtual bool SyslogAppender::reopen ( )
virtual

Calls closelog(3) and openlog(3).

Reimplemented from AppenderSkeleton.

static int SyslogAppender::toSyslogPriority ( Priority::Value  priority)
static

Translates a log4cpp priority to a syslog priority.

Parameters
priorityThe log4cpp priority.
Returns
the syslog priority.

Member Data Documentation

int SyslogAppender::_facility
protected

Definition at line 72 of file SyslogAppender.hh.

const std::string SyslogAppender::_syslogName
protected

Definition at line 71 of file SyslogAppender.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:55