public final class LoggerManager
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
LoggerManager.TimeTaggingLogger
Logger keeps track of the last record timetag.
|
Constructor and Description |
---|
LoggerManager() |
Modifier and Type | Method and Description |
---|---|
static void |
addHandlerToAll(java.util.logging.Handler handler)
Add the handler to all loggers created by this manager, and all
future.
|
static void |
clearTimer()
explicitly remove this timer.
|
static java.util.logging.Logger |
getLogger(java.lang.String id)
return the requested logger, but add it to the list of known loggers.
|
static java.util.Set<java.lang.String> |
getLoggers()
return the list of known loggers.
|
static boolean |
isEnableTimers()
return enableTimers property.
|
static boolean |
isUseTimeTaggingLoggers()
are we keeping track of log message times, so we can sort loggers by
how recently messages were posted?
|
static void |
logExitGuiEvent(java.awt.event.ActionEvent e)
call this at the end of the GUI event to measure time to respond.
|
static void |
logExitGuiEvent(javax.swing.event.ChangeEvent e)
call this at the end of the GUI event to measure time to respond.
|
static void |
logExitGuiEvent(java.awt.event.FocusEvent e)
call this at the end of the GUI event to measure time to respond.
|
static void |
logExitGuiEvent(java.awt.event.ItemEvent e)
call this at the end of the GUI event to measure time to respond.
|
static void |
logGuiEvent(java.awt.event.ActionEvent e)
provide easy way to log all GUI events.
|
static void |
logGuiEvent(javax.swing.event.ChangeEvent e)
log the GUI ChangeEvent
|
static void |
logGuiEvent(java.awt.event.FocusEvent e)
log the GUI FocusEvent
|
static void |
logGuiEvent(java.awt.event.ItemEvent e)
log the GUI ItemEvent
|
static void |
logPropertyChangeEvent(java.beans.PropertyChangeEvent e)
log property change events.
|
static void |
logPropertyChangeEvent(java.beans.PropertyChangeEvent e,
java.lang.String source)
log property change events.
|
static void |
markTime()
mark the time using the thread name.
|
static void |
markTime(java.lang.String message)
mark the time that this occurred.
|
static void |
readConfiguration()
A slightly more transparent logging configuration would provide feedback
about what configuration file it's loading.
|
static void |
readConfiguration(java.lang.String configfile)
A slightly more transparent logging configuration would provide feedback
about what configuration file it's loading.
|
static void |
resetTimer()
reset the timer.
|
static void |
resetTimer(java.lang.String task)
reset the timer for this thread.
|
static void |
setEnableTimers(boolean enableTimers)
if enableTimers is true, then resetTimer and markTime have
an effect.
|
static void |
setTimerLogfile(java.lang.String f)
channel the logging information to here, setEnableTimers(false) to close.
|
static void |
setUseTimeTaggingLoggers(boolean t) |
public static void setUseTimeTaggingLoggers(boolean t)
t
- public static boolean isUseTimeTaggingLoggers()
public static java.util.logging.Logger getLogger(java.lang.String id)
id
- the namepublic static java.util.Set<java.lang.String> getLoggers()
public static void addHandlerToAll(java.util.logging.Handler handler)
handler
- e.g. GraphicalLogHandlerpublic static boolean isEnableTimers()
public static void setEnableTimers(boolean enableTimers)
enableTimers
- true to enable timerspublic static void setTimerLogfile(java.lang.String f) throws java.io.FileNotFoundException
f
- java.io.FileNotFoundException
public static void resetTimer()
public static void resetTimer(java.lang.String task)
task
- setEnableTimers(boolean)
,
setTimerLogfile(java.lang.String)
public static void markTime()
public static void markTime(java.lang.String message)
message
- message to accompanyto turn on timers.
,
to reset timers.
public static void clearTimer()
resetTimer()
public static void logGuiEvent(java.awt.event.ActionEvent e)
e
- public static void logExitGuiEvent(java.awt.event.ActionEvent e)
e
- the focus event.public static void logGuiEvent(javax.swing.event.ChangeEvent e)
e
- public static void logExitGuiEvent(javax.swing.event.ChangeEvent e)
e
- the focus event.public static void logGuiEvent(java.awt.event.ItemEvent e)
e
- public static void logExitGuiEvent(java.awt.event.ItemEvent e)
e
- the focus event.public static void logGuiEvent(java.awt.event.FocusEvent e)
e
- public static void logExitGuiEvent(java.awt.event.FocusEvent e)
e
- the focus event.public static void logPropertyChangeEvent(java.beans.PropertyChangeEvent e)
e
- public static void logPropertyChangeEvent(java.beans.PropertyChangeEvent e, java.lang.String source)
e
- source
- comment on the sourcepublic static void readConfiguration()
public static void readConfiguration(java.lang.String configfile)
configfile
- the file to read