org.oddjob.logging.log4j
Class Log4jPrintStream

java.lang.Object
  extended by java.io.OutputStream
      extended by org.oddjob.logging.AbstractLoggingOutput
          extended by org.oddjob.logging.log4j.Log4jPrintStream
All Implemented Interfaces:
Closeable, Flushable

public class Log4jPrintStream
extends AbstractLoggingOutput

An OutputStream that write it's output to a Log4j logger.

Author:
rob

Constructor Summary
Log4jPrintStream(org.apache.log4j.Logger logger, org.apache.log4j.Level level)
          Constructor.
Log4jPrintStream(OutputStream existing, org.apache.log4j.Logger logger, org.apache.log4j.Level level)
          Constructor.
 
Method Summary
protected  void dispatch(String message)
           
 
Methods inherited from class org.oddjob.logging.AbstractLoggingOutput
close, flush, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Log4jPrintStream

public Log4jPrintStream(org.apache.log4j.Logger logger,
                        org.apache.log4j.Level level)
Constructor.

Parameters:
logger - The log4j Logger.
level - The Log4j level.

Log4jPrintStream

public Log4jPrintStream(OutputStream existing,
                        org.apache.log4j.Logger logger,
                        org.apache.log4j.Level level)
Constructor.

Parameters:
existing - An optional existing stream output will be 'teed' to.
logger - The log4j Logger.
level - The Log4j level.
Method Detail

dispatch

protected void dispatch(String message)
Specified by:
dispatch in class AbstractLoggingOutput