Class TextOrGUIHandler
java.lang.Object
java.util.logging.Handler
com.xinapse.util.logging.TextOrGUIHandler
A
TextOrGUIHandler publishes log records to:
- In text mode, either:
System.err(for Levels of WARN or higher), orSystem.outfor lower Levels.
- In GUI mode, the pop-up Error Console, but also duplicates SEVERE and WARNING messages to
System.err.
The formatter used is a XinapseFormatter.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Forces any data that may have been buffered to the underlying output devices, but does not closeSystem.outorSystem.err.voidflush()Forces any data that may have been buffered to the underlying output devices, but does not closeSystem.outorSystem.err.voidPublishes aLogRecord, provided the record passes all tests for being loggable.voidMethods inherited from class Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, setEncoding, setErrorManager, setFilter, setFormatter
-
Method Details
-
setLevel
-
publish
Publishes aLogRecord, provided the record passes all tests for being loggable.Most applications do not need to call this method directly. Instead, they will use a
Logger, which will create LogRecords and distribute them to registered handlers.This implementation of
publishcalls flush() for every request to publish a record, so they appear immediately. -
flush
public void flush()Forces any data that may have been buffered to the underlying output devices, but does not closeSystem.outorSystem.err.In case of an I/O failure, the
ErrorManagers of thisTextOrGUIHandlerwill be informed, but the caller of this method will not receive an exception. -
close
public void close()Forces any data that may have been buffered to the underlying output devices, but does not closeSystem.outorSystem.err.In case of an I/O failure, the
ErrorManagers of thisTextOrGUIHandlerwill be informed, but the caller of this method will not receive an exception.
-