public class LoggerOutputStream extends 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.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Shutdown stream.
|
void |
flush()
Flush data to underlying logger.
|
void |
write(int data)
Write a single byte of data to output stream.
|
write, writepublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOException - if an error occurs while closing the streampublic void write(int data)
throws IOException
write in class OutputStreamdata - the byte of dataIOException - if an error occurspublic void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOException - if an error occursCopyright © 1997–2019. All rights reserved.