|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.apache.tools.ant.ProjectComponent
|
+--org.apache.tools.ant.types.DataType
|
+--org.apache.anteater.test.BaseDataType
|
+--org.apache.anteater.test.log.BaseLogger
A basic Logger implementation. Implements functionality common to most Logger classes. It performs the following functions:
BaseLogger.TestLog object from a sequence of
testXxx method calls. This is a bit like how a SAX parser will assemble a
DOM object.
| Nested Class Summary | |
class |
BaseLogger.TestLog
|
| Field Summary | |
protected File |
_destDir
|
protected long |
_dt
|
protected int |
_errors
|
protected String |
_extension
|
protected int |
_failures
|
protected String |
_filenameFormat
|
protected Boolean |
_overwrite
|
protected long |
_t0
|
protected int |
_tasks
|
protected BaseLogger.TestLog |
_testLog
|
protected boolean |
_useFile
|
protected String |
DEFAULT_LOGDIR
Directory relative to ${basedir} which will be the default location for log files, unless the 'todir' property is set. |
| Fields inherited from class org.apache.anteater.test.BaseDataType |
debug, debugWasSet |
| Fields inherited from class org.apache.tools.ant.types.DataType |
checked, description, ref |
| Fields inherited from class org.apache.tools.ant.ProjectComponent |
project |
| Constructor Summary | |
BaseLogger()
|
|
| Method Summary | |
void |
endActionTask(ActionTask task)
Indicates that an ActionTask has ended. |
void |
endTest(MatcherTest test)
Indicates that a test against the retrieved response has completed. |
void |
setExtension(String extension)
Set the extension of the log file (if any). |
void |
setFilenameFormat(String filenameFormat)
Sets a template with which the names of log files are determined. |
void |
setOverwrite(boolean overwrite)
Set whether the logger should overwrite old log files from previous runs. |
void |
setTodir(File destDir)
Set the destination directory for the log file (if any). |
void |
setUseFile(boolean useFile)
Set whether the logger should log to a file (or stdout). |
void |
startActionTask(ActionTask task)
Indicates that an ActionTask (aka HTTP operation) has started. |
void |
startTest(MatcherTest test)
Indicates the start of a test against the retrieved Response. |
void |
testError(String msg,
Exception e)
ActionTasks may fail unexpectedly, and these are classed as Errors and should be reported here. |
void |
testFailure(String msg,
Exception e)
If the ActionTask fails to validate the service, then a failure should be recorded via this method. |
void |
testLog(String msg)
ActionTasks may log anything they think relevant to the user here. |
| Methods inherited from class org.apache.anteater.test.BaseDataType |
debug, getDataTypeName, getDebug, getGroup, getRef, print, println, setDebug, setGroup, setGroup, setRefid |
| Methods inherited from class org.apache.tools.ant.types.DataType |
circularReference, dieOnCircularReference, getCheckedRef, getDescription, isReference, noChildrenAllowed, setDescription, tooManyAttributes |
| Methods inherited from class org.apache.tools.ant.ProjectComponent |
getProject, log, log, setProject |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.anteater.test.log.Logger |
actionTaskError |
| Methods inherited from interface org.apache.anteater.test.Groupable |
setGroup, setGroup |
| Field Detail |
protected String DEFAULT_LOGDIR
protected int _tasks
protected int _errors
protected int _failures
protected long _t0
protected long _dt
protected BaseLogger.TestLog _testLog
protected File _destDir
protected String _extension
protected boolean _useFile
protected String _filenameFormat
protected Boolean _overwrite
| Constructor Detail |
public BaseLogger()
| Method Detail |
public void startActionTask(ActionTask task)
Logger
startActionTask in interface Loggerpublic void startTest(MatcherTest test)
Logger
startTest in interface Loggerpublic void testLog(String msg)
Logger
testLog in interface Logger
public void testError(String msg,
Exception e)
Logger
testError in interface Logger
public void testFailure(String msg,
Exception e)
Logger
testFailure in interface Loggerpublic void endTest(MatcherTest test)
Logger
endTest in interface Loggerpublic void endActionTask(ActionTask task)
Logger
endActionTask in interface Loggerpublic void setTodir(File destDir)
Logger
setTodir in interface Loggerpublic void setUseFile(boolean useFile)
Logger
setUseFile in interface Loggerpublic void setFilenameFormat(String filenameFormat)
Logger
setFilenameFormat in interface Loggerpublic void setOverwrite(boolean overwrite)
Logger
setOverwrite in interface Loggerpublic void setExtension(String extension)
Logger
setExtension in interface Logger
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||