public abstract class AbstractLoggingOutput extends OutputStream
The internal buffer is synchronised so this class is thread safe, however no synchronisation occurs between writing to the underlying stream and the log so output could be in a different order.
Constructor and Description |
---|
AbstractLoggingOutput(OutputStream existing)
Constructor.
|
public AbstractLoggingOutput(OutputStream existing)
existing
- The output stream to also write to. May be null.level
- The level to use when logging.consoleArchiver
- The logger to write to.public void write(int c) throws IOException
write
in class OutputStream
IOException
public void write(byte[] b) throws IOException
write
in class OutputStream
IOException
public void write(byte[] buf, int off, int len) 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
protected abstract void dispatch(String message)