org.apache.log.output.net
Class DatagramOutputTarget
- Closeable, 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.
|
DatagramOutputTarget(InetAddress address, int port, Formatter formatter, String encoding) - 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
DatagramOutputTarget
public DatagramOutputTarget(InetAddress address,
int port,
Formatter formatter,
String encoding)
throws IOException
Create a output target with end point specified by address and port.
address
- the address endpointport
- the address portformatter
- the message formatterencoding
- the encoding to use when encoding string
write
protected void write(String stringData)
Method to write output to datagram.
- write in interface AbstractOutputTarget
stringData
- the data to be output