org.stanwood.media.logging
Class LoggerOutputStream
java.lang.Object
java.io.OutputStream
org.stanwood.media.logging.LoggerOutputStream
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable
public class LoggerOutputStream
- extends java.io.OutputStream
Used to write stream data to the log
Method Summary |
void |
close()
This will close the stream and esure that the buffer has been written to the log |
protected void |
log(java.lang.String msg)
|
void |
write(int c)
Append char to the buffer. |
Methods inherited from class java.io.OutputStream |
flush, write, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LoggerOutputStream
public LoggerOutputStream(org.apache.log4j.Level level)
- The constructor
- Parameters:
level
- The log level to output to
write
public void write(int c)
throws java.io.IOException
- Append char to the buffer. if a
- Specified by:
write
in class java.io.OutputStream
- Throws:
java.io.IOException
log
protected void log(java.lang.String msg)
close
public void close()
throws java.io.IOException
- This will close the stream and esure that the buffer has been written to the log
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class java.io.OutputStream
- Throws:
java.io.IOException