Public Member Functions | |
SyslogAppender () | |
SyslogAppender (const LayoutPtr &layout, int syslogFacility) | |
SyslogAppender (const LayoutPtr &layout, const LogString &syslogHost, int syslogFacility) | |
~SyslogAppender () | |
void | close () |
Release any resources held by this SyslogAppender. | |
void | append (const spi::LoggingEventPtr &event, log4cxx::helpers::Pool &p) |
Subclasses of AppenderSkeleton should implement this method to perform actual logging. | |
void | activateOptions (log4cxx::helpers::Pool &p) |
This method returns immediately as options are activated when they are set. | |
void | setOption (const LogString &option, const LogString &value) |
Set option to value . | |
virtual bool | requiresLayout () const |
The SyslogAppender requires a layout. | |
void | setSyslogHost (const LogString &syslogHost) |
The SyslogHost option is the name of the the syslog host where log output should go. | |
const LogString & | getSyslogHost () const |
Returns the value of the SyslogHost option. | |
void | setFacility (const LogString &facilityName) |
Set the syslog facility. | |
LogString | getFacility () const |
Returns the value of the Facility option. | |
void | setFacilityPrinting (bool facilityPrinting1) |
If the FacilityPrinting option is set to true, the printed message will include the facility name of the application. | |
bool | getFacilityPrinting () const |
Returns the value of the FacilityPrinting option. | |
Static Public Member Functions | |
static LogString | getFacilityString (int syslogFacility) |
Returns the specified syslog facility as a lower-case String, e.g. | |
static int | getFacility (const LogString &facilityName) |
Returns the integer value corresponding to the named syslog facility, or -1 if it couldn't be recognized. | |
Protected Member Functions | |
void | initSyslogFacilityStr () |
Protected Attributes | |
int | syslogFacility |
LogString | facilityStr |
bool | facilityPrinting |
helpers::SyslogWriter * | sw |
LogString | syslogHost |
|
|
|
|
|
|
|
|
|
This method returns immediately as options are activated when they are set.
Reimplemented from AppenderSkeleton. |
|
Subclasses of See also AppenderSkeleton::doAppend method. Implements AppenderSkeleton. |
|
Release any resources held by this SyslogAppender.
Implements Appender. |
|
Returns the value of the Facility option.
|
|
Returns the integer value corresponding to the named syslog facility, or -1 if it couldn't be recognized.
|
|
Returns the value of the FacilityPrinting option.
|
|
Returns the specified syslog facility as a lower-case String, e.g. "kern", "user", etc. |
|
Returns the value of the SyslogHost option.
|
|
|
|
The SyslogAppender requires a layout.
Hence, this method returns Implements Appender. |
|
Set the syslog facility. This is the Facility option.
The |
|
If the FacilityPrinting option is set to true, the printed message will include the facility name of the application. It is false by default. |
|
Set 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. |
|
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. |
|
|
|
|
|
|
|
|
|
|