|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
java.io.FilterOutputStream
java.io.PrintStream
edu.mines.jtk.util.LoggerStream
public class LoggerStream
Wrap a Logger as a PrintStream. Useful mainly for porting code that previously logged to a System PrintStream or to a proxy. Calling LoggerStream.println() will call Logger.info() for Level.INFO. A call to flush() or to a println() method will flush previously written text, and complete a call to Logger. You may be surprised by extra newlines, if you call print("\n") and flush() instead of println();
| Field Summary |
|---|
| Fields inherited from class java.io.FilterOutputStream |
|---|
out |
| Constructor Summary | |
|---|---|
LoggerStream(java.util.logging.Logger logger,
java.util.logging.Level level)
Wrap a Logger as a PrintStream . |
|
| Method Summary | |
|---|---|
boolean |
checkError()
|
void |
close()
|
void |
flush()
|
static void |
main(java.lang.String[] args)
test code |
void |
println()
|
void |
println(java.lang.Object x)
|
void |
println(java.lang.String x)
|
| Methods inherited from class java.io.PrintStream |
|---|
append, append, append, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, setError, write, write |
| Methods inherited from class java.io.FilterOutputStream |
|---|
write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LoggerStream(java.util.logging.Logger logger,
java.util.logging.Level level)
logger - Everything written to this PrintStream
will be passed to the appropriate method of the Loggerlevel - This indicates which method of the
Logger should be called.| Method Detail |
|---|
public void flush()
flush in interface java.io.Flushableflush in class java.io.PrintStreampublic void println()
println in class java.io.PrintStreampublic void println(java.lang.Object x)
println in class java.io.PrintStreampublic void println(java.lang.String x)
println in class java.io.PrintStreampublic void close()
close in interface java.io.Closeableclose in class java.io.PrintStreampublic boolean checkError()
checkError in class java.io.PrintStreampublic static void main(java.lang.String[] args)
args - command line
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||