org.oddjob.logging.log4j
Class Log4jPrintStream
java.lang.Object
java.io.OutputStream
org.oddjob.logging.AbstractLoggingOutput
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.
dispatch
protected void dispatch(String message)
- Specified by:
dispatch
in class AbstractLoggingOutput