|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.log.output.AbstractTarget
org.apache.log.output.AbstractOutputTarget
org.apache.log.output.net.SocketOutputTarget
public class SocketOutputTarget
SocketOutputTarget Useful for writing the output to a TCP/IP client socket.
| Field Summary | |
|---|---|
private ObjectOutputStream |
m_outputStream
Output strem to write the log |
private Socket |
m_socket
Socket to communicate with the server |
| Constructor Summary | |
|---|---|
SocketOutputTarget(InetAddress address,
int port)
Creates output target with the end point specified by the address and port |
|
SocketOutputTarget(String host,
int port)
Creates the output target with the end point specified by host and port |
|
| Method Summary | |
|---|---|
void |
close()
Shutdown target. |
protected void |
doProcessEvent(LogEvent event)
To process the LogEvent |
protected void |
write(LogEvent event)
Writes the output as a LogEvent without formatting. |
| Methods inherited from class org.apache.log.output.AbstractOutputTarget |
|---|
getFormatter, open, write |
| Methods inherited from class org.apache.log.output.AbstractTarget |
|---|
getErrorHandler, isOpen, processEvent, setErrorHandler |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private Socket m_socket
private ObjectOutputStream m_outputStream
| Constructor Detail |
|---|
public SocketOutputTarget(InetAddress address,
int port)
throws IOException
address - end point addressport - the end point port
IOException - if an I/O error ocurrs when creating socket
public SocketOutputTarget(String host,
int port)
throws IOException
host - end point hostport - the end point port
IOException - if an I/O error ocurrs when creating socket| Method Detail |
|---|
protected void write(LogEvent event)
event - the LogEventprotected void doProcessEvent(LogEvent event)
doProcessEvent in class AbstractOutputTargetevent - the LogEventpublic void close()
close in interface Closeableclose in class AbstractOutputTarget
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||