Public Member Functions | |
void | close () |
void | append (const spi::LoggingEventPtr &event) |
void | activateOptions () |
void | setOption (const String &option, const String &value) |
virtual bool | requiresLayout () const |
void | setSyslogHost (const String &syslogHost) |
const String & | getSyslogHost () const |
void | setFacility (const String &facilityName) |
String | getFacility () const |
void | setFacilityPrinting (bool facilityPrinting) |
bool | getFacilityPrinting () const |
Static Public Member Functions | |
static String | getFacilityString (int syslogFacility) |
static int | getFacility (const String &facilityName) |
void close | ( | ) | [virtual] |
Release any resources held by this SyslogAppender.
Implements Appender.
String getFacilityString | ( | int | syslogFacility | ) | [static] |
Returns the specified syslog facility as a lower-case String, e.g. "kern", "user", etc.
Returns the specified syslog facility as a lower-case String, e.g. "kern", "user", etc.
int getFacility | ( | const String & | facilityName | ) | [static] |
Returns the integer value corresponding to the named syslog facility, or -1 if it couldn't be recognized.
facilityName | one of the strings KERN, USER, MAIL, DAEMON, AUTH, SYSLOG, LPR, NEWS, UUCP, CRON, AUTHPRIV, FTP, LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. The matching is case-insensitive. |
void append | ( | const spi::LoggingEventPtr & | event | ) | [virtual] |
Subclasses of AppenderSkeleton
should implement this method to perform actual logging. See also AppenderSkeleton::doAppend method.
Implements AppenderSkeleton.
void activateOptions | ( | ) | [virtual] |
This method returns immediately as options are activated when they are set.
Reimplemented from AppenderSkeleton.
void setOption | ( | const String & | option, | |
const String & | value | |||
) | [virtual] |
Set option
to value
.
The handling of each option depends on the OptionHandler instance. Some options may become active immediately whereas other may be activated only when activateOptions is called.
Reimplemented from AppenderSkeleton.
virtual bool requiresLayout | ( | ) | const [inline, virtual] |
The SyslogAppender requires a layout. Hence, this method returns true
.
Implements Appender.
void setSyslogHost | ( | const String & | syslogHost | ) |
The SyslogHost option is the name of the the syslog host where log output should go. WARNING If the SyslogHost is not set, then this appender will fail.
const String& getSyslogHost | ( | ) | const [inline] |
Returns the value of the SyslogHost option.
void setFacility | ( | const String & | facilityName | ) |
Set the syslog facility. This is the Facility option.
The facilityName
parameter must be one of the strings KERN, USER, MAIL, DAEMON, AUTH, SYSLOG, LPR, NEWS, UUCP, CRON, AUTHPRIV, FTP, LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. Case is unimportant.
String getFacility | ( | ) | const [inline] |
Returns the value of the Facility option.
void setFacilityPrinting | ( | bool | facilityPrinting | ) | [inline] |
If the FacilityPrinting option is set to true, the printed message will include the facility name of the application. It is false by default.
bool getFacilityPrinting | ( | ) | const [inline] |
Returns the value of the FacilityPrinting option.