java.lang.Object | ||
↳ | org.apache.log4j.AppenderSkeleton | |
↳ | org.apache.log4j.net.SyslogAppender |
Use SyslogAppender to send log messages to a remote syslog daemon.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | FACILITY_OI | ||||||||||
int | LOG_AUTH | security/authorization messages | |||||||||
int | LOG_AUTHPRIV | security/authorization messages (private) | |||||||||
int | LOG_CRON | clock daemon | |||||||||
int | LOG_DAEMON | System daemons | |||||||||
int | LOG_FTP | ftp daemon | |||||||||
int | LOG_KERN | Kernel messages | |||||||||
int | LOG_LOCAL0 | reserved for local use | |||||||||
int | LOG_LOCAL1 | reserved for local use | |||||||||
int | LOG_LOCAL2 | reserved for local use | |||||||||
int | LOG_LOCAL3 | reserved for local use | |||||||||
int | LOG_LOCAL4 | reserved for local use | |||||||||
int | LOG_LOCAL5 | reserved for local use | |||||||||
int | LOG_LOCAL6 | reserved for local use | |||||||||
int | LOG_LOCAL7 | reserved for local use | |||||||||
int | LOG_LPR | line printer subsystem | |||||||||
int | LOG_MAIL | Mail system | |||||||||
int | LOG_NEWS | network news subsystem | |||||||||
int | LOG_SYSLOG | messages generated internally by syslogd | |||||||||
int | LOG_USER | Random user-level messages | |||||||||
int | LOG_UUCP | UUCP subsystem | |||||||||
int | SYSLOG_HOST_OI |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.apache.log4j.AppenderSkeleton
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method returns immediately as options are activated when they
are set.
| |||||||||||
Subclasses of
AppenderSkeleton should implement this
method to perform actual logging. | |||||||||||
Release any resources held by this SyslogAppender.
| |||||||||||
Returns the integer value corresponding to the named syslog
facility, or -1 if it couldn't be recognized.
| |||||||||||
Returns the value of the Facility option.
| |||||||||||
Returns the value of the FacilityPrinting option.
| |||||||||||
Returns the specified syslog facility as a lower-case String,
e.g.
| |||||||||||
If true, the appender will generate the HEADER part (that is, timestamp and host name)
of the syslog packet.
| |||||||||||
Returns the value of the SyslogHost option.
| |||||||||||
The SyslogAppender requires a layout.
| |||||||||||
Set the syslog facility.
| |||||||||||
If the FacilityPrinting option is set to true, the printed
message will include the facility name of the application.
| |||||||||||
Returns whether the appender produces the HEADER part (that is, timestamp and host name)
of the syslog packet.
| |||||||||||
The SyslogHost option is the name of the the syslog host
where log output should go.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.apache.log4j.AppenderSkeleton
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.apache.log4j.Appender
| |||||||||||
From interface
org.apache.log4j.spi.OptionHandler
|
security/authorization messages
security/authorization messages (private)
clock daemon
System daemons
ftp daemon
Kernel messages
reserved for local use
reserved for local use
reserved for local use
reserved for local use
reserved for local use
reserved for local use
reserved for local use
reserved for local use
line printer subsystem
Mail system
network news subsystem
messages generated internally by syslogd
Random user-level messages
UUCP subsystem
This method returns immediately as options are activated when they are set.
Subclasses of AppenderSkeleton
should implement this
method to perform actual logging. See also AppenderSkeleton.doAppend
method.
Release any resources held by this SyslogAppender.
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. |
---|
Returns the value of the Facility option.
Returns the value of the FacilityPrinting option.
Returns the specified syslog facility as a lower-case String, e.g. "kern", "user", etc.
If true, the appender will generate the HEADER part (that is, timestamp and host name) of the syslog packet. Default value is false for compatibility with existing behavior, however should be true unless there is a specific justification.
Returns the value of the SyslogHost option.
The SyslogAppender requires a layout. Hence, this method returns
true
.
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.
If the FacilityPrinting option is set to true, the printed message will include the facility name of the application. It is false by default.
Returns whether the appender produces the HEADER part (that is, timestamp and host name) of the syslog packet.
The SyslogHost option is the name of the the syslog host where log output should go. A non-default port can be specified by appending a colon and port number to a host name, an IPv4 address or an IPv6 address enclosed in square brackets. WARNING If the SyslogHost is not set, then this appender will fail.