|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.logging.Handler
org.objectweb.easybeans.log.JDKConsoleHandler
public class JDKConsoleHandler
Handler that display info message in System.out and error in System.err because JDK implementation prints all messages in System.err and in Eclipse, for example, INFO messages are in red !
Field Summary | |
---|---|
private java.io.Writer |
errOutputWriter
Writer used for WARNING, SEVERE, FATAL. |
private java.io.Writer |
infoOutputWriter
Writer used for traces INFO, FINE, FINEST, etc. |
Constructor Summary | |
---|---|
JDKConsoleHandler()
Creates a new handler with two appender, System.out and System.err. |
Method Summary | |
---|---|
void |
close()
Close the handler by flushing all writers. |
void |
flush()
Flush all the current writers (info and error). |
private void |
flush(java.io.Writer writer)
Flush the given writer. |
void |
publish(java.util.logging.LogRecord logRecord)
Prints the record on the correct writer. |
Methods inherited from class java.util.logging.Handler |
---|
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.io.Writer infoOutputWriter
private java.io.Writer errOutputWriter
Constructor Detail |
---|
public JDKConsoleHandler()
Method Detail |
---|
public void publish(java.util.logging.LogRecord logRecord)
publish
in class java.util.logging.Handler
logRecord
- the given record with all info to log.private void flush(java.io.Writer writer)
writer
- the writer to flush.public void flush()
flush
in class java.util.logging.Handler
public void close()
close
in class java.util.logging.Handler
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |