|
Wildfire 3.2.4 Javadoc | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.OutputStream
org.jivesoftware.util.log.util.LoggerOutputStream
public class 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 LoggerOutputStream outputStream =
new LoggerOutputStream( logger, Priority.DEBUG );
final PrintStream output = new PrintStream( outputStream, true );
System.setOut( output );
| Constructor Summary | |
|---|---|
LoggerOutputStream(Logger logger,
Priority priority)
Construct OutputStreamLogger to send to a particular logger at a particular priority. |
|
| Method Summary | |
|---|---|
void |
close()
Shutdown stream. |
void |
flush()
Flush data to underlying logger. |
void |
write(int data)
Write a single byte of data to output stream. |
| Methods inherited from class java.io.OutputStream |
|---|
write, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LoggerOutputStream(Logger logger,
Priority priority)
logger - the logger to send topriority - the priority at which to log| Method Detail |
|---|
public void close()
throws IOException
close in interface Closeableclose in class OutputStreamIOException
public void write(int data)
throws IOException
write in class OutputStreamdata - the byte of data
IOException - if an error occurs
public void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOException - if an error occurs
|
Wildfire 3.2.4 Javadoc | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||