edu.stanford.ejalbert.testing
Class TestAppLogger
java.lang.Object
net.sf.wraplog.AbstractLogger
edu.stanford.ejalbert.testing.TestAppLogger
- class TestAppLogger
- extends AbstractLogger
Implements a logger for the test application. The log messages
are sent to a JTextArea.
Methods inherited from class net.sf.wraplog.AbstractLogger |
checkLevel, debug, debug, error, error, getLevel, getLoggedMessageCount, info, info, isDebugEnabled, isEnabled, isErrorEnabled, isInfoEnabled, isWarnEnabled, log, log, setLevel, warn, warn |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TestAppLogger
public TestAppLogger(JTextArea debugTextArea,
String[] levelLabels,
String dateFormat)
reallyLog
protected void reallyLog(int logLevel,
String message,
Throwable error)
throws Exception
- Logs a message and optional error details.
- Specified by:
reallyLog
in class AbstractLogger
- Parameters:
logLevel
- one of: Level.DEBUG, Level.INFO, Level.WARN,
Level.ERRORmessage
- the actual message; this will never be
null
error
- an error that is related to the message; unless
null
, the name and stack trace of the error are logged
- Throws:
Exception
getLevelText
public String getLevelText()
getLevelOptions
public String[] getLevelOptions()