public class SocketOutputTarget extends AbstractOutputTarget
| Modifier and Type | Field and Description |
|---|---|
private java.io.ObjectOutputStream |
m_outputStream
Output strem to write the log
|
private java.net.Socket |
m_socket
Socket to communicate with the server
|
| Constructor and Description |
|---|
SocketOutputTarget(java.net.InetAddress address,
int port)
Creates output target with the end point specified by the address and port
|
SocketOutputTarget(java.lang.String host,
int port)
Creates the output target with the end point specified by host and port
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
getFormatter, open, writegetErrorHandler, isOpen, processEvent, setErrorHandlerprivate java.net.Socket m_socket
private java.io.ObjectOutputStream m_outputStream
public SocketOutputTarget(java.net.InetAddress address,
int port)
throws java.io.IOException
address - end point addressport - the end point portjava.io.IOException - if an I/O error ocurrs when creating socketpublic SocketOutputTarget(java.lang.String host,
int port)
throws java.io.IOException
host - end point hostport - the end point portjava.io.IOException - if an I/O error ocurrs when creating socketprotected 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