Package com.randomnoun.common.log4j2
Class LoggingOutputStream
java.lang.Object
java.io.OutputStream
com.randomnoun.common.log4j2.LoggingOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
An outputstream that writes to a log4j Logger.
Lines are terminated by CRLF or LF.
- Author:
- knoxg
-
Constructor Summary
ConstructorsConstructorDescriptionLoggingOutputStream
(org.apache.logging.log4j.Logger logger) LoggingOutputStream
(org.apache.logging.log4j.Logger logger, String charsetName) LoggingOutputStream
(org.apache.logging.log4j.Logger logger, Charset charset) -
Method Summary
Methods inherited from class java.io.OutputStream
close, flush, nullOutputStream, write, write
-
Constructor Details
-
LoggingOutputStream
public LoggingOutputStream(org.apache.logging.log4j.Logger logger, Charset charset) throws IOException - Throws:
IOException
-
LoggingOutputStream
public LoggingOutputStream(org.apache.logging.log4j.Logger logger, String charsetName) throws IOException - Throws:
IOException
-
LoggingOutputStream
- Throws:
IOException
-
-
Method Details
-
write
- Specified by:
write
in classOutputStream
- Throws:
IOException
-