|
Log4j 1.3alpha-5 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.log4j.spi.ComponentBase | +--org.apache.log4j.AppenderSkeleton | +--org.apache.log4j.net.SyslogAppender
Implements an RFC 3164 compliant agent to send log messages to a remote syslog daemon.
Field Summary | |
protected static int |
FACILITY_OI
|
protected java.text.FieldPosition |
pos
|
protected static int |
SYSLOG_HOST_OI
|
Fields inherited from class org.apache.log4j.AppenderSkeleton |
closed, headFilter, layout, name, tailFilter, threshold |
Fields inherited from class org.apache.log4j.spi.ComponentBase |
repository |
Constructor Summary | |
SyslogAppender()
|
Method Summary | |
void |
activateOptions()
This method returns immediately as options are activated when they are set. |
void |
append(LoggingEvent event)
Subclasses of AppenderSkeleton should implement this method
to perform actual logging. |
void |
close()
Release any resources held by this SyslogAppender. |
java.lang.String |
getFacility()
Returns the value of the Facility option. |
Layout |
getLayout()
Returns the layout of this appender. |
java.lang.String |
getLocalHostname()
This method gets the network name of the machine we are running on. |
java.lang.String |
getSyslogHost()
Returns the value of the SyslogHost option. |
void |
setFacility(java.lang.String facility)
Set the syslog facility. |
void |
setLayout(Layout layout)
Set the layout for this appender. |
void |
setSyslogHost(java.lang.String syslogHost)
The SyslogHost option is the name of the the syslog host where log output should go. |
Methods inherited from class org.apache.log4j.AppenderSkeleton |
addFilter, clearFilters, doAppend, finalize, getFilter, getFirstFilter, getName, getThreshold, isAsSevereAsThreshold, setName, setThreshold |
Methods inherited from class org.apache.log4j.spi.ComponentBase |
getLogger, setLoggerRepository |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.log4j.Appender |
setLoggerRepository |
Field Detail |
protected static final int SYSLOG_HOST_OI
protected static final int FACILITY_OI
protected java.text.FieldPosition pos
Constructor Detail |
public SyslogAppender()
Method Detail |
public void close()
public java.lang.String getLocalHostname()
public void activateOptions()
activateOptions
in interface OptionHandler
activateOptions
in class AppenderSkeleton
public void setSyslogHost(java.lang.String syslogHost)
public java.lang.String getSyslogHost()
public void setFacility(java.lang.String facility)
The facility
parameter must be one of the strings KERN,
USER, MAIL, DAEMON, AUTH, SYSLOG, LPR, NEWS, UUCP, CRON, AUTHPRIV, FTP,
NTP, AUDIT, ALERT, CLOCK, LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5,
LOCAL6, LOCAL7. Case is not important.
See SyslogConstants
and RFC 3164 for more information about the
Facility option.
public java.lang.String getFacility()
setFacility(java.lang.String)
for the set of allowed values.
public void append(LoggingEvent event)
AppenderSkeleton
AppenderSkeleton
should implement this method
to perform actual logging. See also AppenderSkeleton.doAppend
method.
append
in class AppenderSkeleton
public Layout getLayout()
AppenderSkeleton
getLayout
in interface Appender
getLayout
in class AppenderSkeleton
public void setLayout(Layout layout)
AppenderSkeleton
SocketAppender
ignores the layout set here.
setLayout
in interface Appender
setLayout
in class AppenderSkeleton
|
Log4j 1.3alpha-5 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |