org.apache.log4j.net
public class SyslogAppender extends AppenderSkeleton
Field Summary | |
---|---|
protected static int | FACILITY_OI |
static int | LOG_AUTH security/authorization messages |
static int | LOG_AUTHPRIV security/authorization messages (private) |
static int | LOG_CRON clock daemon |
static int | LOG_DAEMON System daemons |
static int | LOG_FTP ftp daemon |
static int | LOG_KERN Kernel messages |
static int | LOG_LOCAL0 reserved for local use |
static int | LOG_LOCAL1 reserved for local use |
static int | LOG_LOCAL2 reserved for local use |
static int | LOG_LOCAL3 reserved for local use |
static int | LOG_LOCAL4 reserved for local use |
static int | LOG_LOCAL5 reserved for local use |
static int | LOG_LOCAL6 reserved for local use |
static int | LOG_LOCAL7 reserved for local use |
static int | LOG_LPR line printer subsystem |
static int | LOG_MAIL Mail system |
static int | LOG_NEWS network news subsystem |
static int | LOG_SYSLOG messages generated internally by syslogd |
static int | LOG_USER Random user-level messages |
static int | LOG_UUCP UUCP subsystem |
protected static int | SYSLOG_HOST_OI |
Constructor Summary | |
---|---|
SyslogAppender() | |
SyslogAppender(Layout layout, int syslogFacility) | |
SyslogAppender(Layout layout, String syslogHost, int syslogFacility) |
Method Summary | |
---|---|
void | activateOptions()
This method returns immediately as options are activated when they
are set. |
void | append(LoggingEvent event) |
void | close()
Release any resources held by this SyslogAppender. |
static int | getFacility(String facilityName)
Returns the integer value corresponding to the named syslog
facility, or -1 if it couldn't be recognized. |
String | getFacility()
Returns the value of the Facility option. |
boolean | getFacilityPrinting()
Returns the value of the FacilityPrinting option. |
static String | getFacilityString(int syslogFacility)
Returns the specified syslog facility as a lower-case String,
e.g. |
String | getSyslogHost()
Returns the value of the SyslogHost option. |
boolean | requiresLayout()
The SyslogAppender requires a layout. |
void | setFacility(String facilityName)
Set the syslog facility. |
void | setFacilityPrinting(boolean on)
If the FacilityPrinting option is set to true, the printed
message will include the facility name of the application. |
void | setSyslogHost(String syslogHost)
The SyslogHost option is the name of the the syslog host
where log output should go.
|
Since: 0.8.4
Parameters: 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.
Since: 1.1
true
.Since: 0.8.4
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.
Since: 0.8.1