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