|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mckoi.debug.DefaultDebugLogger
public class DefaultDebugLogger
A default implementation of DebugLogger that logs messages to a PrintWriter object.
This implementation allows for filtering of log messages of particular depth. So for example, only message above or equal to level ALERT are shown.
Field Summary |
---|
Fields inherited from interface com.mckoi.debug.Lvl |
---|
ALERT, ERROR, INFORMATION, MESSAGE, WARNING |
Constructor Summary | |
---|---|
DefaultDebugLogger()
|
Method Summary | |
---|---|
boolean |
isInterestedIn(int level)
Queries the current debug level. |
void |
listenToEventDispatcher()
Sets up the system so that the debug messenger will intercept event dispatch errors and output the event to the debug stream. |
void |
setDebugLevel(int level)
Sets the debug level that's to be output to the stream. |
void |
setOutput(java.io.Writer out)
Sets up the OutputStream to which the debug information is to be output to. |
void |
write(int level,
java.lang.Class cla,
java.lang.String message)
|
void |
write(int level,
java.lang.Object ob,
java.lang.String message)
This writes the given debugging string. |
void |
write(int level,
java.lang.String class_string,
java.lang.String message)
|
void |
writeException(int level,
java.lang.Throwable e)
This writes the given Exception but gives it a 'debug_level'. |
void |
writeException(java.lang.Throwable e)
This writes the given Exception. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultDebugLogger()
Method Detail |
---|
public final void setOutput(java.io.Writer out)
public final void setDebugLevel(int level)
public final void listenToEventDispatcher()
public final boolean isInterestedIn(int level)
DebugLogger
isInterestedIn
in interface DebugLogger
public final void write(int level, java.lang.Object ob, java.lang.String message)
DebugLogger
write
in interface DebugLogger
public final void write(int level, java.lang.Class cla, java.lang.String message)
write
in interface DebugLogger
public final void write(int level, java.lang.String class_string, java.lang.String message)
write
in interface DebugLogger
public final void writeException(java.lang.Throwable e)
DebugLogger
writeException
in interface DebugLogger
public final void writeException(int level, java.lang.Throwable e)
DebugLogger
writeException
in interface DebugLogger
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |