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 InetAddress
private ByteArrayOutputStream
private DatagramSocket
private static final int
The 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:
UnknownHostException
SocketException
-
-
Method Details
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
-
getPort
public int getPort() -
write
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
getSendBufferSize
- Throws:
SocketException
-