|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.log4j.AppenderSkeleton org.dcm4che2.audit.log4j.net.SyslogAppender
public class SyslogAppender
Use SyslogAppender to send log messages to a remote syslog daemon.
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 |
static int |
PRI_ALERT
action must be taken immediately |
static int |
PRI_CRITICAL
critical conditions |
static int |
PRI_DEBUG
debug-level messages |
static int |
PRI_EMERGENCY
system is unusable |
static int |
PRI_ERROR
error conditions |
static int |
PRI_INFORMATIONAL
informational messages |
static int |
PRI_NOTICE
normal but significant condition |
static int |
PRI_WARNING
warning conditions |
protected static int |
SYSLOG_HOST_OI
|
Fields inherited from class org.apache.log4j.AppenderSkeleton |
---|
closed, errorHandler, headFilter, layout, name, tailFilter, threshold |
Constructor Summary | |
---|---|
SyslogAppender()
|
|
SyslogAppender(org.apache.log4j.Layout layout,
int syslogFacility)
|
|
SyslogAppender(org.apache.log4j.Layout layout,
java.lang.String syslogHost,
int syslogFacility)
|
Method Summary | |
---|---|
void |
activateOptions()
This method returns immediately as options are activated when they are set. |
void |
append(org.apache.log4j.spi.LoggingEvent event)
|
void |
close()
Release any resources held by this SyslogAppender. |
int |
getDebugPriority()
|
java.lang.String |
getEncoding()
|
int |
getErrorPriority()
|
java.lang.String |
getFacility()
Returns the value of the Facility option. |
static int |
getFacility(java.lang.String facilityName)
Returns the integer value corresponding to the named syslog facility, or -1 if it couldn't be recognized. |
static java.lang.String |
getFacilityString(int syslogFacility)
Returns the specified syslog facility as a lower-case String, e.g. |
int |
getFatalPriority()
|
int |
getInfoPriority()
|
java.lang.String |
getLocalHostname()
|
java.lang.String |
getSyslogHost()
Returns the value of the SyslogHost option. |
int |
getWarnPriority()
|
boolean |
requiresLayout()
The SyslogAppender requires a layout. |
void |
setDebugPriority(int debugPriority)
|
void |
setEncoding(java.lang.String encoding)
|
void |
setErrorPriority(int errorPriority)
|
void |
setFacility(java.lang.String facilityName)
Set the syslog facility. |
void |
setFatalPriority(int fatalPriority)
|
void |
setInfoPriority(int infoPriority)
|
void |
setSyslogHost(java.lang.String syslogHost)
The SyslogHost option is the name of the the syslog host where log output should go. |
void |
setWarnPriority(int warnPriority)
|
Methods inherited from class org.apache.log4j.AppenderSkeleton |
---|
addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setLayout, setName, setThreshold |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int LOG_KERN
public static final int LOG_USER
public static final int LOG_MAIL
public static final int LOG_DAEMON
public static final int LOG_AUTH
public static final int LOG_SYSLOG
public static final int LOG_LPR
public static final int LOG_NEWS
public static final int LOG_UUCP
public static final int LOG_CRON
public static final int LOG_AUTHPRIV
public static final int LOG_FTP
public static final int LOG_LOCAL0
public static final int LOG_LOCAL1
public static final int LOG_LOCAL2
public static final int LOG_LOCAL3
public static final int LOG_LOCAL4
public static final int LOG_LOCAL5
public static final int LOG_LOCAL6
public static final int LOG_LOCAL7
public static final int PRI_EMERGENCY
public static final int PRI_ALERT
public static final int PRI_CRITICAL
public static final int PRI_ERROR
public static final int PRI_WARNING
public static final int PRI_NOTICE
public static final int PRI_INFORMATIONAL
public static final int PRI_DEBUG
protected static final int SYSLOG_HOST_OI
protected static final int FACILITY_OI
Constructor Detail |
---|
public SyslogAppender()
public SyslogAppender(org.apache.log4j.Layout layout, int syslogFacility)
public SyslogAppender(org.apache.log4j.Layout layout, java.lang.String syslogHost, int syslogFacility)
Method Detail |
---|
public void close()
public static java.lang.String getFacilityString(int syslogFacility)
public static int getFacility(java.lang.String facilityName)
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.public java.lang.String getLocalHostname()
public final int getFatalPriority()
public final void setFatalPriority(int fatalPriority)
public final int getErrorPriority()
public final void setErrorPriority(int errorPriority)
public final int getWarnPriority()
public final void setWarnPriority(int warnPriority)
public final int getInfoPriority()
public final void setInfoPriority(int infoPriority)
public final int getDebugPriority()
public final void setDebugPriority(int debugPriority)
public final java.lang.String getEncoding()
public final void setEncoding(java.lang.String encoding)
public void append(org.apache.log4j.spi.LoggingEvent event)
append
in class org.apache.log4j.AppenderSkeleton
public void activateOptions()
activateOptions
in interface org.apache.log4j.spi.OptionHandler
activateOptions
in class org.apache.log4j.AppenderSkeleton
public boolean requiresLayout()
true
.
public void setSyslogHost(java.lang.String syslogHost)
public java.lang.String getSyslogHost()
public void setFacility(java.lang.String facilityName)
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.
public java.lang.String getFacility()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |