|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.logging.Handler be.ugent.caagt.swirl.logging.JListLogHandler
public class JListLogHandler
Log handler which outputs its log records to a JList
, where
new records end up at the top.
The simplest way to use this class is by adding the following statement to the start of the application
JListLogHandler.createDialog ("Log window", "");This will make a window pop up with all logged messages, as soon as a message of a sufficiently high level (a warning, by default) is sent to the loggin system.
Configuration:
By default the handler is initialized using the following
LogManager
configuration properties.
java.util.logging.Level.INFO
).
Filter
class to use (defaults to none).
Formatter
class to use
(defaults to SimpleFormatter
).
Constructor Summary | |
---|---|
JListLogHandler(javax.swing.JList jlist)
Create a log handler which shall send its output to the given list. |
Method Summary | |
---|---|
void |
close()
|
static javax.swing.JDialog |
createLoggingDialog(java.lang.String title,
java.lang.String loggerName)
Create a dialog which contains a list which is handled by a new handler, registered to the named logger of the application (use the empty string for the root logger). |
protected void |
drawAttention()
Draw attention to the logging window. |
void |
flush()
|
java.util.logging.Level |
getPopupLevel()
Retrieve the popup log level, i.e., the minimum level for which the handler will try to draw the attention of the user by sounding a beep, making the parent window of the list visible and moving it to the front. |
void |
publish(java.util.logging.LogRecord record)
|
void |
setPopupLevel(java.util.logging.Level popupLevel)
Set the popup log level. |
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 |
Constructor Detail |
---|
public JListLogHandler(javax.swing.JList jlist)
Method Detail |
---|
public java.util.logging.Level getPopupLevel()
public final void setPopupLevel(java.util.logging.Level popupLevel)
protected void drawAttention()
public static javax.swing.JDialog createLoggingDialog(java.lang.String title, java.lang.String loggerName)
public void publish(java.util.logging.LogRecord record)
publish
in class java.util.logging.Handler
public void close() throws java.lang.SecurityException
close
in class java.util.logging.Handler
java.lang.SecurityException
public void flush()
flush
in class java.util.logging.Handler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |