|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ccg.swing.AbstractLogModel
com.ccg.swing.SystemLogModel
public final class SystemLogModel
A implementation of the LogModel which controls the JVM's log and debug output messages.
This LogModel allows one to directly control
the logging/debug levels of the static Log object which
is being used by the active JVM. If you adjust the values from this
model, you will adjust the verbosity of the Log/Debug message produced by the active application.
Since there is only one common instance of the system logger,
you can not construct this object, you can however, gain access to
the single instance of the object which exists
in the JVM}.
A typical use of this class might look like the following:
LogEditor le = new LogEditor(SystemLogModel.getInstance());
To see a working example of using the LogModel,
DefaultLogModel, SystemLogModel and LogEditor objects in
combination, take a look at LogTest.java.
AbstractLogModel,
DefaultLogModel,
LogEditor| Method Summary | |
|---|---|
int |
getDebugLevel()
Get the current debug
level for debug messages. |
static LogModel |
getInstance()
Get access to the LogModel for the applications log control. |
int |
getLogLevel()
Get the current log level for
logged messages. |
void |
setDebugLevel(int val)
Set the current debug
level for debug messages. |
void |
setLogLevel(int val)
Set the current log level for
logged messages. |
| Methods inherited from class com.ccg.swing.AbstractLogModel |
|---|
addChangeListener, fireChangeEvent, removeChangeListener, toString, validateDebugLevel, validateLogLevel |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public int getLogLevel()
LogModellog level for
logged messages.
LogModel.setLogLevel(int)public void setLogLevel(int val)
LogModellog level for
logged messages.
Note, if you attempt to set a invalid value, it will be silently ignored.
val - New int value to assign.LogModel.getLogLevel()public int getDebugLevel()
LogModeldebug
level for debug messages.
LogModel.setDebugLevel(int)public void setDebugLevel(int val)
LogModeldebug
level for debug messages.
Note, if you attempt to set a invalid value, it will be silently ignored.
val - New int value to assign.LogModel.getDebugLevel()public static LogModel getInstance()
LogModel for the applications log control.
If the application has been built to use the Log
and Debug classes for logging information, this
method can be used to gain access to a LogModel
object associated with these two static objects.
By using this, you can allow the user to control the log output verbosity of the active application.
This is the only way to gain access to a object of this type (as you can not construct these objects directly).
LogModel object that is
tied to the JVM's (active application's) Log/Debug output.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||