org.apache.log.util
public class LoggerOutputStream extends java.io.OutputStream
final LoggerOutputStream outputStream = new LoggerOutputStream( logger, Priority.DEBUG ); final PrintStream output = new PrintStream( outputStream, true ); System.setOut( output );
Constructor and Description |
---|
LoggerOutputStream(Logger logger,
Priority priority)
Construct OutputStreamLogger to write to a particular logger at a particular priority.
|
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.OutputStream
java.io.IOException
- if an error occurs while closing the streampublic void write(int data) throws java.io.IOException
write
in class java.io.OutputStream
data
- the byte of datajava.io.IOException
- if an error occurspublic void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
java.io.IOException
- if an error occurs