
log4cpp:RemoteSyslogAppender (3)
NAME
log4cpp::RemoteSyslogAppender - RemoteSyslogAppender sends
LoggingEvents to a remote syslog system.
SYNOPSIS
#include <RemoteSyslogAppender.hh>
Inherits log4cpp::LayoutAppender.
Public Methods
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.
virtual ~RemoteSyslogAppender ()
virtual bool reopen ()
Closes and reopens the socket.
virtual void close ()
Closes the socket.
Static Public Methods
int toSyslogPriority (Priority::Value priority)
Translates a log4cpp priority to a syslog priority.
Protected Methods
virtual void open ()
Just creates the socket.
virtual void _append (const LoggingEvent &event)
Sends a LoggingEvent to the remote syslog.
Protected Attributes
const std::string _syslogName
const std::string _relayer
int _facility
int _portNumber
int _socket
unsigned long _ipAddr
DETAILED DESCRIPTION
RemoteSyslogAppender sends LoggingEvents to a remote syslog system.
Also see: draft-ietf-syslog-syslog-12.txt
CONSTRUCTOR & DESTRUCTOR DOCUMENTATION
log4cpp::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:
The syslog facility to log to. Defaults to LOG_USER.
portNumber
An alternative port number. Defaults to the standard syslog
port number (514).
log4cpp::RemoteSyslogAppender::~RemoteSyslogAppender () [virtual]
MEMBER FUNCTION DOCUMENTATION
void log4cpp::RemoteSyslogAppender::_append (const LoggingEvent & event)
[protected, virtual]
Sends a LoggingEvent to the remote syslog.
Parameters:
event the LoggingEvent to log.
Implements log4cpp::AppenderSkeleton.
void log4cpp::RemoteSyslogAppender::close () [virtual]
Closes the socket.
Implements log4cpp::AppenderSkeleton.
void log4cpp::RemoteSyslogAppender::open () [protected, virtual]
Just creates the socket.
bool log4cpp::RemoteSyslogAppender::reopen () [virtual]
Closes and reopens the socket.
Reimplemented from log4cpp::AppenderSkeleton.
int log4cpp::RemoteSyslogAppender::toSyslogPriority (Priority::Value
priority) [static]
Translates a log4cpp priority to a syslog priority.
Parameters:
priority
The log4cpp priority.
Returns:
the syslog priority.
MEMBER DATA DOCUMENTATION
int log4cpp::RemoteSyslogAppender::_facility [protected]
unsigned long log4cpp::RemoteSyslogAppender::_ipAddr [protected]
int log4cpp::RemoteSyslogAppender::_portNumber [protected]
const std::string log4cpp::RemoteSyslogAppender::_relayer [protected]
int log4cpp::RemoteSyslogAppender::_socket [protected]
const std::string log4cpp::RemoteSyslogAppender::_syslogName [protected]
AUTHOR
Generated automatically by Doxygen for log4cpp from the source code.
log4cpp 19 Aug 2003 log4cpp::RemoteSyslogAppender(3)