|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.protomatter.syslog.BasicLogger
util.DatagramLog
public class DatagramLog
This syslog facilitiy ties into a running syslog-server. It sends datagram packages to the syslog-server, which may reside on a remote machine.
This class joins the syslog client with the protomatter syslog-facilities. It expands the protomatter BasicLogger class and loosely ties into the syslog client.
| Nested Class Summary | |
|---|---|
static class |
DatagramLog.Test
Test purpose only. |
| Field Summary | |
|---|---|
private InetAddress |
boundAddress
|
private int |
facility
|
private String |
hostName
|
private int |
portNum
|
private DatagramSocket |
socket
|
| Fields inherited from class com.protomatter.syslog.BasicLogger |
|---|
formatter, policy, realPolicy |
| Constructor Summary | |
|---|---|
DatagramLog()
Creates a Syslog object instance, targeted for the UNIX host with the hostname 'hostname' on the syslog port 'port'. |
|
DatagramLog(String hostname,
int port,
int fac)
Creates a Syslog object instance, targeted for the UNIX host with the hostname 'hostname' on the syslog port 'port'. |
|
| Method Summary | |
|---|---|
private void |
cleanup()
|
void |
flush()
Flush the stream. |
String |
getFacility()
|
String |
getHost()
|
int |
getPort()
|
private void |
initialize()
|
void |
log(com.protomatter.syslog.SyslogMessage message)
Write a log message. |
private void |
resolve()
|
void |
setFacility(String facname)
|
void |
setHost(String hname)
|
void |
setPort(int port)
|
void |
shutdown()
Clean up and prepare for shutdown. |
private void |
syslog(InetAddress addr,
int port,
int fac,
int pri,
String msg)
Use this method to log your syslog messages. |
| Methods inherited from class com.protomatter.syslog.BasicLogger |
|---|
formatLogEntry, getName, getPolicy, getTextFormatter, isSuspended, mightLog, resetDateFormat, resume, setName, setPolicy, setTextFormatter, shouldLog, suspend |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private String hostName
private int portNum
private InetAddress boundAddress
private DatagramSocket socket
private int facility
| Constructor Detail |
|---|
public DatagramLog()
public DatagramLog(String hostname,
int port,
int fac)
| Method Detail |
|---|
public void setFacility(String facname)
public String getFacility()
public void setHost(String hname)
public String getHost()
public void setPort(int port)
public int getPort()
private void resolve()
private void initialize()
private void syslog(InetAddress addr,
int port,
int fac,
int pri,
String msg)
public void log(com.protomatter.syslog.SyslogMessage message)
log in interface com.protomatter.syslog.Sysloggerlog in class com.protomatter.syslog.BasicLoggerprivate void cleanup()
public void shutdown()
shutdown in interface com.protomatter.syslog.Sysloggershutdown in class com.protomatter.syslog.BasicLoggerpublic void flush()
flush in interface com.protomatter.syslog.Sysloggerflush in class com.protomatter.syslog.BasicLogger
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||