#include <SyslogAppender.hh>
Public Member Functions | |
virtual void | close () |
virtual void | close () |
virtual bool | reopen () |
virtual bool | reopen () |
SyslogAppender (const std::string &name, const std::string &syslogName, int facility=LOG_USER) | |
SyslogAppender (const std::string &name, const std::string &syslogName, int facility=LOG_USER) | |
virtual | ~SyslogAppender () |
virtual | ~SyslogAppender () |
Static Public Member Functions | |
static int | toSyslogPriority (Priority::Value priority) |
static int | toSyslogPriority (Priority::Value priority) |
Protected Member Functions | |
virtual void | _append (const LoggingEvent &event) |
virtual void | _append (const LoggingEvent &event) |
virtual void | open () |
virtual void | open () |
Protected Attributes | |
int | _facility |
const std::string | _syslogName |
SyslogAppender sends LoggingEvents to the local syslog system.
Definition at line 25 of file include/log4cpp/SyslogAppender.hh.
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 log4cpp::SyslogAppender::~SyslogAppender | ( | ) | [virtual] |
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 log4cpp::SyslogAppender::~SyslogAppender | ( | ) | [virtual] |
virtual void log4cpp::SyslogAppender::_append | ( | const LoggingEvent & | event | ) | [protected, virtual] |
Sends a LoggingEvent to syslog.
event | the LoggingEvent to log. |
Implements log4cpp::AppenderSkeleton.
virtual void log4cpp::SyslogAppender::_append | ( | const LoggingEvent & | event | ) | [protected, virtual] |
Sends a LoggingEvent to syslog.
event | the LoggingEvent to log. |
Implements log4cpp::AppenderSkeleton.
virtual void log4cpp::SyslogAppender::close | ( | ) | [virtual] |
Calls closelog(3) to close the syslog file descriptor.
Implements log4cpp::AppenderSkeleton.
virtual void log4cpp::SyslogAppender::close | ( | ) | [virtual] |
Calls closelog(3) to close the syslog file descriptor.
Implements log4cpp::AppenderSkeleton.
virtual void log4cpp::SyslogAppender::open | ( | ) | [protected, virtual] |
Calls openlog(3).
virtual void log4cpp::SyslogAppender::open | ( | ) | [protected, virtual] |
Calls openlog(3).
virtual bool log4cpp::SyslogAppender::reopen | ( | ) | [virtual] |
Calls closelog(3) and openlog(3).
Reimplemented from log4cpp::AppenderSkeleton.
virtual bool log4cpp::SyslogAppender::reopen | ( | ) | [virtual] |
Calls closelog(3) and openlog(3).
Reimplemented from log4cpp::AppenderSkeleton.
static int log4cpp::SyslogAppender::toSyslogPriority | ( | Priority::Value | priority | ) | [static] |
static int log4cpp::SyslogAppender::toSyslogPriority | ( | Priority::Value | priority | ) | [static] |
int log4cpp::SyslogAppender::_facility [protected] |
Definition at line 72 of file include/log4cpp/SyslogAppender.hh.
const std::string log4cpp::SyslogAppender::_syslogName [protected] |
Definition at line 71 of file include/log4cpp/SyslogAppender.hh.