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, writeprotected 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 OutputStreamIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOExceptionpublic String getSourceClassName()
public void setSourceClassName(String sourceClassName)