Class LogOutputStream

java.lang.Object
java.io.OutputStream
java.io.ByteArrayOutputStream
org.apache.openjpa.lib.log.LogOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class LogOutputStream extends ByteArrayOutputStream
Many standard components log to OutputStreams. 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.
Author:
Abe White, Marc Prud'hommeaux
  • Constructor Details

    • LogOutputStream

      public LogOutputStream(Log log, int level)
      Constructor.
      Parameters:
      log - the log to log to
      level - the level to log at
  • Method Details