|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.anteater.test.log.CompositeLogger
A Logger that implements the Composite (GoF) pattern, by delegating method calls to a group of Loggers. With this, ActionTasks and Tests that use logging don't need to care how many or what type of Logger they're actually using.
ActionTask
Constructor Summary | |
CompositeLogger()
|
Method Summary | |
void |
actionTaskError(String msg,
Exception e)
Indicates that an error occurred before any of the tests were attempted. |
void |
addLogger(Logger logger)
|
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 ext)
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 |
setGroup(Group group)
|
void |
setGroup(String name)
|
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). |
int |
size()
|
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CompositeLogger()
Method Detail |
public void addLogger(Logger logger)
public void setGroup(String name)
setGroup
in interface Groupable
public void setGroup(Group group)
setGroup
in interface Groupable
public void startActionTask(ActionTask task)
Logger
startActionTask
in interface Logger
public void actionTaskError(String msg, Exception e)
Logger
If this event occurs, no further tests are expected to be logged.
actionTaskError
in interface Logger
public void startTest(MatcherTest test)
Logger
startTest
in interface Logger
public 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 Logger
public void endTest(MatcherTest test)
Logger
endTest
in interface Logger
public void endActionTask(ActionTask task)
Logger
endActionTask
in interface Logger
public void setTodir(File destDir)
Logger
setTodir
in interface Logger
public void setUseFile(boolean useFile)
Logger
setUseFile
in interface Logger
public void setFilenameFormat(String filenameFormat)
Logger
setFilenameFormat
in interface Logger
public void setOverwrite(boolean overwrite)
Logger
setOverwrite
in interface Logger
public void setExtension(String ext)
Logger
setExtension
in interface Logger
public int size()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |