public class LogOutputStream extends ByteArrayOutputStream
OutputStream
s.
This wrapper class extends the ByteArrayOutputStream
class and writes all given data to an underlying Log
instance
whenever it is flushed and the internally held byte array contains a newline.buf, count
Constructor and Description |
---|
LogOutputStream(Log log,
int level)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
flush() |
close, reset, size, toByteArray, toString, toString, toString, write, write, writeTo
write
public LogOutputStream(Log log, int level)
log
- the log to log tolevel
- the level to log atpublic void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
Copyright © 2006–2018 Apache Software Foundation. All rights reserved.