Package net.mcreator.util
Class LoggingOutputStream
java.lang.Object
java.io.OutputStream
net.mcreator.util.LoggingOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
-
Constructor Summary
ConstructorDescriptionLoggingOutputStream
(org.apache.logging.log4j.Logger log, org.apache.logging.log4j.Level level) Creates the Logging instance to flush to the given logger. -
Method Summary
Methods inherited from class java.io.OutputStream
nullOutputStream, write, write
-
Constructor Details
-
LoggingOutputStream
public LoggingOutputStream(org.apache.logging.log4j.Logger log, org.apache.logging.log4j.Level level) throws IllegalArgumentException Creates the Logging instance to flush to the given logger.- Parameters:
log
- the Logger to write tolevel
- the log level- Throws:
IllegalArgumentException
- in case if one of arguments is null.
-
-
Method Details
-
write
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
flush
public void flush()- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
-