org.apache.log.output.net
Class DatagramOutputTarget
- ErrorAware, LogTarget
public class DatagramOutputTarget
A datagram output target.
Useful for writing using custom protocols or writing to syslog daemons.
DatagramOutputTarget(InetAddress address, int port)- Create a output target with end point specified by address and port.
|
DatagramOutputTarget(InetAddress address, int port, Formatter formatter)- Create a output target with end point specified by address and port.
|
void | close()- Shutdown target.
|
protected void | write(String stringData)- Method to write output to datagram.
|
DatagramOutputTarget
public DatagramOutputTarget(InetAddress address,
int port)
throws IOException Create a output target with end point specified by address and port.
address - the address endpointport - the address port
DatagramOutputTarget
public DatagramOutputTarget(InetAddress address,
int port,
Formatter formatter)
throws IOException Create a output target with end point specified by address and port.
address - the address endpointport - the address portformatter - the message formatter
close
public void close()
Shutdown target.
Attempting to write to target after close() will cause errors to be logged.
- close in interface AbstractOutputTarget
write
protected void write(String stringData)
Method to write output to datagram.
- write in interface AbstractOutputTarget
stringData - the data to be output