log4cpp 1.1
|
RemoteSyslogAppender sends LoggingEvents to a remote syslog system. More...
#include <RemoteSyslogAppender.hh>
Public Member Functions | |
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. | |
![]() | |
LayoutAppender (const std::string &name) | |
virtual | ~LayoutAppender () |
virtual bool | requiresLayout () const |
Check if the appender requires a layout. | |
virtual void | setLayout (Layout *layout=NULL) |
Set the Layout for this appender. | |
![]() | |
virtual | ~AppenderSkeleton () |
Destructor for AppenderSkeleton. | |
virtual void | doAppend (const LoggingEvent &event) |
Log in Appender specific way. | |
virtual bool | reopen () |
Reopens the output destination of this Appender, e.g. | |
virtual void | close ()=0 |
Release any resources allocated within the appender such as file handles, network connections, etc. | |
virtual bool | requiresLayout () const =0 |
Check if the appender uses a layout. | |
virtual void | setLayout (Layout *layout)=0 |
Set the Layout for this appender. | |
virtual void | setThreshold (Priority::Value priority) |
Set the threshold priority of this Appender. | |
virtual Priority::Value | getThreshold () |
Get the threshold priority of this Appender. | |
virtual void | setFilter (Filter *filter) |
Set a Filter for this appender. | |
virtual Filter * | getFilter () |
Get the Filter for this appender. | |
![]() | |
virtual | ~Appender () |
Destructor for Appender. | |
virtual void | doAppend (const LoggingEvent &event)=0 |
Log in Appender specific way. | |
virtual bool | reopen ()=0 |
Reopens the output destination of this Appender, e.g. | |
virtual void | close ()=0 |
Release any resources allocated within the appender such as file handles, network connections, etc. | |
virtual bool | requiresLayout () const =0 |
Check if the appender uses a layout. | |
virtual void | setLayout (Layout *layout)=0 |
Set the Layout for this appender. | |
const std::string & | getName () const |
Get the name of this appender. | |
virtual void | setThreshold (Priority::Value priority)=0 |
Set the threshold priority of this Appender. | |
virtual Priority::Value | getThreshold ()=0 |
Get the threshold priority of this Appender. | |
virtual void | setFilter (Filter *filter)=0 |
Set a Filter for this appender. | |
virtual Filter * | getFilter ()=0 |
Get the Filter for this appender. | |
Static Public Member Functions | |
static int | toSyslogPriority (Priority::Value priority) |
Translates a log4cpp priority to a syslog priority. | |
![]() | |
static Appender * | getAppender (const std::string &name) |
Get a pointer to an exitsing Appender. | |
static bool | reopenAll () |
Call reopen() on all existing Appenders. | |
static void | closeAll () |
Call reopen() on all existing Appenders. | |
Protected Member Functions | |
virtual void | open () |
Just creates the socket. | |
virtual void | _append (const LoggingEvent &event) |
Sends a LoggingEvent to the remote syslog. | |
![]() | |
Layout & | _getLayout () |
Return the layout of the appender. | |
![]() | |
AppenderSkeleton (const std::string &name) | |
Constructor for AppenderSkeleton. | |
virtual void | _append (const LoggingEvent &event)=0 |
Log in Appender specific way. | |
![]() | |
Appender (const std::string &name) | |
Constructor for Appender. | |
Protected Attributes | |
const std::string | _syslogName |
const std::string | _relayer |
int | _facility |
int | _portNumber |
SOCKET | _socket |
in_addr_t | _ipAddr |
Additional Inherited Members | |
![]() | |
typedef BasicLayout | DefaultLayoutType |
RemoteSyslogAppender sends LoggingEvents to a remote syslog system.
Also see: draft-ietf-syslog-syslog-12.txt
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.
name | The name of the Appender |
syslogName | The ident parameter in the openlog(3) call. |
relayer | The IP address or hostname of a standard syslog host. |
facility | The syslog facility to log to. Defaults to LOG_USER. Value '-1' implies to use the default. |
portNumber | An alternative port number. Defaults to the standard syslog port number (514). Value '-1' implies to use the default. |
|
virtual |
|
protectedvirtual |
Sends a LoggingEvent to the remote syslog.
event | the LoggingEvent to log. |
Implements log4cpp::AppenderSkeleton.
|
virtual |
Closes the socket.
Implements log4cpp::AppenderSkeleton.
|
protectedvirtual |
Just creates the socket.
|
virtual |
Closes and reopens the socket.
Reimplemented from log4cpp::AppenderSkeleton.
|
static |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |