public class LoggingOutputStream extends OutputStream
OutputStream
and automatically passes each line to the Logger
when OutputStream.flush()
or OutputStream.close()
is called.Constructor and Description |
---|
LoggingOutputStream(Level level)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
String |
getSourceClassName() |
void |
setSourceClassName(String sourceClassName) |
void |
write(int b) |
write, write
protected static final Logger LOGGER
public LoggingOutputStream(Level level)
level
- the level at which to log (required)public void write(int b) throws IOException
write
in class OutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
public String getSourceClassName()
public void setSourceClassName(String sourceClassName)