Package org.apache.openjpa.lib.log
Class LogOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.ByteArrayOutputStream
-
- org.apache.openjpa.lib.log.LogOutputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.Flushable
,java.lang.AutoCloseable
public class LogOutputStream extends java.io.ByteArrayOutputStream
Many standard components log toOutputStream
s. This wrapper class extends theByteArrayOutputStream
class and writes all given data to an underlyingLog
instance whenever it is flushed and the internally held byte array contains a newline.- Author:
- Abe White, Marc Prud'hommeaux
-
-
Constructor Summary
Constructors Constructor Description LogOutputStream(Log log, int level)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
flush()
-
-
-
Constructor Detail
-
LogOutputStream
public LogOutputStream(Log log, int level)
Constructor.- Parameters:
log
- the log to log tolevel
- the level to log at
-
-