Package ch.qos.logback.core.net
Class SyslogOutputStream
java.lang.Object
java.io.OutputStream
ch.qos.logback.core.net.SyslogOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
SyslogOutputStream is a wrapper around the
DatagramSocket class so that it
behaves like an OutputStream.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate InetAddressprivate ByteArrayOutputStreamprivate DatagramSocketprivate static final intThe maximum length after which we discard the existing string buffer and start anew.private final int -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.OutputStream
write
-
Field Details
-
MAX_LEN
private static final int MAX_LENThe maximum length after which we discard the existing string buffer and start anew.- See Also:
-
address
-
ds
-
baos
-
port
private final int port
-
-
Constructor Details
-
SyslogOutputStream
- Throws:
UnknownHostExceptionSocketException
-
-
Method Details
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream
-
getPort
public int getPort() -
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
getSendBufferSize
- Throws:
SocketException
-