net.spy.log
Class LoggingOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by net.spy.log.LineGettingOutputStream
          extended by net.spy.log.LoggingOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class LoggingOutputStream
extends LineGettingOutputStream

An OutputStream that logs to a Logger.


Constructor Summary
LoggingOutputStream(java.lang.String name)
          Get an instance of LoggingOutputStream.
LoggingOutputStream(java.lang.String name, Level lv)
          Get an instance of LoggingOutputStream.
 
Method Summary
protected  void processChunk(java.lang.String chunk)
          Send the stuff to the logger.
static void redefineOutputs()
          Redefine stdout and stderr using new logging streams.
 
Methods inherited from class net.spy.log.LineGettingOutputStream
setErr, setOut, write, write
 
Methods inherited from class java.io.OutputStream
close, flush, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggingOutputStream

public LoggingOutputStream(java.lang.String name)
Get an instance of LoggingOutputStream.


LoggingOutputStream

public LoggingOutputStream(java.lang.String name,
                           Level lv)
Get an instance of LoggingOutputStream.

Method Detail

processChunk

protected void processChunk(java.lang.String chunk)
Send the stuff to the logger.

Specified by:
processChunk in class LineGettingOutputStream
Parameters:
chunk -

redefineOutputs

public static void redefineOutputs()
Redefine stdout and stderr using new logging streams.



Copyright © 1995-2007 SPY Internetworking. All Rights Reserved.