|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.util.logging.Handler
org.liquidsite.util.log.SyslogHandler
A UNIX syslog handler. This implementation is based on RFC 3164.
| Field Summary | |
protected static int |
ALERT_SEVERITY
The alert log severity. |
protected static int |
CRITICAL_SEVERITY
The critical log severity. |
protected static int |
DEBUG_SEVERITY
The debug log severity. |
protected static int |
EMERGENCY_SEVERITY
The emergency log severity. |
protected static int |
ERROR_SEVERITY
The error log severity. |
protected static int |
INFO_SEVERITY
The informational log severity. |
protected static int |
NOTICE_SEVERITY
The notice log severity. |
protected static int |
WARNING_SEVERITY
The warning log severity. |
| Constructor Summary | |
SyslogHandler()
Creates a new syslog handler. |
|
| Method Summary | |
void |
close()
Closes the log handler and frees any resources. |
void |
flush()
Flushes any buffered output. |
java.net.InetAddress |
getAddress()
Returns the IP address of the syslog server. |
int |
getFacility()
Returns the log facility to use. |
java.lang.String |
getHostname()
Returns the hostname to use. |
int |
getPort()
Returns the port number of the syslog server. |
java.lang.String |
getTag()
Returns the log tag to use. |
void |
publish(java.util.logging.LogRecord record)
Publishes a log record. |
void |
setAddress(java.net.InetAddress address)
Sets the IP address of the syslog server. |
void |
setFacility(int facility)
Sets the log facility to use. |
void |
setHostname(java.lang.String hostname)
Sets the hostname to use. |
void |
setPort(int port)
Sets the port number of the syslog server. |
void |
setTag(java.lang.String tag)
Sets the log tag to use. |
| Methods inherited from class java.util.logging.Handler |
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final int EMERGENCY_SEVERITY
protected static final int ALERT_SEVERITY
protected static final int CRITICAL_SEVERITY
protected static final int ERROR_SEVERITY
protected static final int WARNING_SEVERITY
protected static final int NOTICE_SEVERITY
protected static final int INFO_SEVERITY
protected static final int DEBUG_SEVERITY
| Constructor Detail |
public SyslogHandler()
throws java.net.SocketException,
java.net.UnknownHostException
java.net.SocketException - if an UDP socket couldn't be opened
java.net.UnknownHostException - if the localhost IP address
couldn't be determined| Method Detail |
public java.net.InetAddress getAddress()
public void setAddress(java.net.InetAddress address)
address - the IP address of the syslog serverpublic int getPort()
public void setPort(int port)
port - the port number of the syslog serverpublic int getFacility()
public void setFacility(int facility)
facility - the new log facilitypublic java.lang.String getHostname()
public void setHostname(java.lang.String hostname)
hostname - the new hostnamepublic java.lang.String getTag()
public void setTag(java.lang.String tag)
tag - the new log tagpublic void publish(java.util.logging.LogRecord record)
record - the log record to publishpublic void close()
public void flush()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||