|
qflib 0.99 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
de.qfs.lib.log.LogStream
This stream logs everything written to it. It can be useful to pipe errors and debugging output from third party packages to the logging facilities.
A LogStream collects its input until it encouters either a LineFeed, a CarriageReturn or a CarriageReturn followed by a LineFeed character. It will then log the buffered line, using the Log level, class and method names passed to its constructor. An explicit call to flush will log the characters collected so far.
No empty log messages will be generated.
Constructor Summary | |
LogStream(int level,
java.lang.String clazz,
java.lang.String method)
Create a new LogStream. |
Method Summary | |
void |
close()
Close the LogStream. |
void |
flush()
Flush the LogStream, logging the current message. |
void |
write(int b)
Write one byte to the LogStream. |
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 LogStream(int level, java.lang.String clazz, java.lang.String method)
level
- The log level for the logStream.clazz
- The class name for the logged messages.method
- The method name for the logged messages.Log
Method Detail |
public void close()
public void flush() throws java.io.IOException
java.io.IOException
- If the LogStream has been closed.public void write(int b) throws java.io.IOException
b
- The byte to write (only the lower 8 bits of the int
are used).
java.io.IOException
- If the LogStream has been closed.
|
qflib 0.99 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |