org.apache.log.util

Class OutputStreamLogger


public class OutputStreamLogger
extends LoggerOutputStream

Redirect an output stream to a logger. This class is useful to redirect standard output or standard error to a Logger. An example use is
 final OutputStreamLogger outputStream =
     new OutputStreamLogger( logger, Priority.DEBUG );
 final PrintStream output = new PrintStream( outputStream, true );

 System.setOut( output );
 
Author:
Peter Donald

Constructor Summary

OutputStreamLogger(Logger logger, Priority priority)
Deprecated. Use LoggerOutputStream as this class was misnamed.

Method Summary

Methods inherited from class org.apache.log.util.LoggerOutputStream

close, flush, write

Constructor Details

OutputStreamLogger

public OutputStreamLogger(Logger logger,
                          Priority priority)

Deprecated. Use LoggerOutputStream as this class was misnamed.

Construct OutputStreamLogger to write to a particular logger at a particular priority.
Parameters:
logger - the logger to write to
priority - the priority at which to log