log4cpp 1.1
|
SyslogAppender sends LoggingEvents to the local syslog system. More...
#include <SyslogAppender.hh>
Public Member Functions | |
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. | |
virtual | ~SyslogAppender () |
virtual bool | reopen () |
Calls closelog(3) and openlog(3). | |
virtual void | close () |
Calls closelog(3) to close the syslog file descriptor. | |
![]() | |
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 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. | |
const std::string & | getName () const |
Get the name of 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 () |
Calls openlog(3). | |
virtual void | _append (const LoggingEvent &event) |
Sends a LoggingEvent to syslog. | |
![]() | |
Layout & | _getLayout () |
Return the layout of the appender. | |
![]() | |
AppenderSkeleton (const std::string &name) | |
Constructor for AppenderSkeleton. | |
![]() | |
Appender (const std::string &name) | |
Constructor for Appender. | |
Protected Attributes | |
const std::string | _syslogName |
int | _facility |
Additional Inherited Members | |
![]() | |
typedef BasicLayout | DefaultLayoutType |
SyslogAppender sends LoggingEvents to the local syslog system.
log4cpp::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.
name | The name of the Appender |
syslogName | The ident parameter in the openlog(3) call. |
facility | The syslog facility to log to. Defaults to LOG_USER. |
|
virtual |
|
protectedvirtual |
Sends a LoggingEvent to syslog.
event | the LoggingEvent to log. |
Implements log4cpp::AppenderSkeleton.
Calls closelog(3) to close the syslog file descriptor.
Implements log4cpp::AppenderSkeleton.
Calls openlog(3).
Calls closelog(3) and openlog(3).
Reimplemented from log4cpp::AppenderSkeleton.
|
static |
|
protected |
|
protected |