| java.lang.Object java.io.OutputStream org.apache.log.util.LoggerOutputStream
All known Subclasses: org.apache.log.util.OutputStreamLogger,
LoggerOutputStream | public class LoggerOutputStream extends OutputStream (Code) | | 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 LoggerOutputStream outputStream =
new LoggerOutputStream( logger, Priority.DEBUG );
final PrintStream output = new PrintStream( outputStream, true );
System.setOut( output );
author: Avalon Development Team author: Peter Donald |
Constructor Summary | |
public | LoggerOutputStream(Logger logger, Priority priority) Construct OutputStreamLogger to write to a particular logger at a particular priority. |
Method Summary | |
public void | close() Shutdown stream. | public synchronized void | flush() Flush data to underlying logger. | public void | write(int data) Write a single byte of data to output stream. |
LoggerOutputStream | public LoggerOutputStream(Logger logger, Priority priority)(Code) | | Construct OutputStreamLogger to write to a particular logger at a particular priority.
Parameters: logger - the logger to write to Parameters: priority - the priority at which to log |
write | public void write(int data) throws IOException(Code) | | Write a single byte of data to output stream.
Parameters: data - the byte of data exception: IOException - if an error occurs |
|
|