edu.stanford.ejalbert.testing
Class TestAppLogger

java.lang.Object
  extended by net.sf.wraplog.AbstractLogger
      extended by edu.stanford.ejalbert.testing.TestAppLogger

 class TestAppLogger
extends AbstractLogger


Field Summary
private  javax.swing.JTextArea debugTextArea
           
private  java.text.SimpleDateFormat format
           
private  java.lang.String[] levelText
           
 
Constructor Summary
TestAppLogger(javax.swing.JTextArea debugTextArea, java.lang.String[] levelLabels, java.lang.String dateFormat)
           
 
Method Summary
 java.lang.String[] getLevelOptions()
           
 java.lang.String getLevelText()
           
private  java.lang.String getLevelText(int logLevel)
          Return text that represents logLevel.
protected  void reallyLog(int logLevel, java.lang.String message, java.lang.Throwable error)
          Logs a message and optional error details.
 
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
 

Field Detail

debugTextArea

private javax.swing.JTextArea debugTextArea

levelText

private java.lang.String[] levelText

format

private java.text.SimpleDateFormat format
Constructor Detail

TestAppLogger

public TestAppLogger(javax.swing.JTextArea debugTextArea,
                     java.lang.String[] levelLabels,
                     java.lang.String dateFormat)
Method Detail

reallyLog

protected void reallyLog(int logLevel,
                         java.lang.String message,
                         java.lang.Throwable error)
                  throws java.lang.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.ERROR
message - 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:
java.lang.Exception

getLevelText

public java.lang.String getLevelText()

getLevelOptions

public java.lang.String[] getLevelOptions()

getLevelText

private java.lang.String getLevelText(int logLevel)
Return text that represents logLevel.