Package org.omegazero.common.logging
Class LoggerOutputStream
java.lang.Object
java.io.OutputStream
org.omegazero.common.logging.LoggerOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
- Since:
- 2.1
-
Constructor Summary
ConstructorsConstructorDescriptionLoggerOutputStream(Logger loggerInstance, LogLevel outputLevel) Creates aLoggerOutputStreamwith the givenLoggerinstance and outputLogLevel. -
Method Summary
Methods inherited from class java.io.OutputStream
close, nullOutputStream, write, write
-
Constructor Details
-
LoggerOutputStream
Creates aLoggerOutputStreamwith the givenLoggerinstance and outputLogLevel.- Parameters:
loggerInstance- TheLoggerinstanceoutputLevel- TheLogLevelto output log messages with- Since:
- 2.10
-
-
Method Details
-
writeOut
public void writeOut()Writes the data stored in the internal buffer as a log message to theLoggerand with theLogLevelgiven in the constructor. -
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
flush
public void flush()- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream
-