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

RemoteSyslogAppender sends LoggingEvents to a remote syslog system. More...

#include <RemoteSyslogAppender.hh>

Inheritance diagram for RemoteSyslogAppender:
Inheritance graph
[legend]

Public Member Functions

virtual void close ()
 Closes the socket. More...
 
 RemoteSyslogAppender (const std::string &name, const std::string &syslogName, const std::string &relayer, int facility=LOG_USER, int portNumber=514)
 Instantiate a RemoteSyslogAppender with given name and name and facility for syslog. More...
 
virtual bool reopen ()
 Closes and reopens the socket. More...
 
virtual ~RemoteSyslogAppender ()
 
- 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 the remote syslog. More...
 
virtual void open ()
 Just creates the socket. 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
 
in_addr_t _ipAddr
 
int _portNumber
 
const std::string _relayer
 
int _socket
 
const std::string _syslogName
 

Private Attributes

int _cludge
 

Additional Inherited Members

- Public Types inherited from LayoutAppender
typedef BasicLayout DefaultLayoutType
 

Detailed Description

RemoteSyslogAppender sends LoggingEvents to a remote syslog system.

Also see: draft-ietf-syslog-syslog-12.txt

Definition at line 72 of file RemoteSyslogAppender.hh.

Constructor & Destructor Documentation

RemoteSyslogAppender::RemoteSyslogAppender ( const std::string &  name,
const std::string &  syslogName,
const std::string &  relayer,
int  facility = LOG_USER,
int  portNumber = 514 
)

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

Parameters
nameThe name of the Appender
syslogNameThe ident parameter in the openlog(3) call.
relayerThe IP address or hostname of a standard syslog host.
facilityThe syslog facility to log to. Defaults to LOG_USER. Value '-1' implies to use the default.
portNumberAn alternative port number. Defaults to the standard syslog port number (514). Value '-1' implies to use the default.
virtual RemoteSyslogAppender::~RemoteSyslogAppender ( )
virtual

Member Function Documentation

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

Sends a LoggingEvent to the remote syslog.

Parameters
eventthe LoggingEvent to log.

Implements AppenderSkeleton.

virtual void RemoteSyslogAppender::close ( )
virtual

Closes the socket.

Implements AppenderSkeleton.

virtual void RemoteSyslogAppender::open ( )
protectedvirtual

Just creates the socket.

virtual bool RemoteSyslogAppender::reopen ( )
virtual

Closes and reopens the socket.

Reimplemented from AppenderSkeleton.

static int RemoteSyslogAppender::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 RemoteSyslogAppender::_cludge
private

Definition at line 135 of file RemoteSyslogAppender.hh.

int RemoteSyslogAppender::_facility
protected

Definition at line 126 of file RemoteSyslogAppender.hh.

in_addr_t RemoteSyslogAppender::_ipAddr
protected

Definition at line 133 of file RemoteSyslogAppender.hh.

int RemoteSyslogAppender::_portNumber
protected

Definition at line 127 of file RemoteSyslogAppender.hh.

const std::string RemoteSyslogAppender::_relayer
protected

Definition at line 125 of file RemoteSyslogAppender.hh.

int RemoteSyslogAppender::_socket
protected

Definition at line 131 of file RemoteSyslogAppender.hh.

const std::string RemoteSyslogAppender::_syslogName
protected

Definition at line 124 of file RemoteSyslogAppender.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