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 aLoggerOutputStream
with the givenLogger
instance and outputLogLevel
. -
Method Summary
Methods inherited from class java.io.OutputStream
close, nullOutputStream, write, write
-
Constructor Details
-
LoggerOutputStream
Creates aLoggerOutputStream
with the givenLogger
instance and outputLogLevel
.- Parameters:
loggerInstance
- TheLogger
instanceoutputLevel
- TheLogLevel
to 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 theLogger
and with theLogLevel
given in the constructor. -
write
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
flush
public void flush()- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
-