org.apache.ant.antunit
Class LogCapturer

java.lang.Object
  extended by org.apache.ant.antunit.LogCapturer

public class LogCapturer
extends java.lang.Object

Captures log messages generated during an antunit task run and makes them available to tasks via a project reference.

This class captures all messages generated during the build and adds itself as project reference to the project using the id ant.antunit.log.


Field Summary
static java.lang.String REFERENCE_ID
           
 
Constructor Summary
LogCapturer(Project p)
           
 
Method Summary
 void buildFinished(BuildEvent event)
          De-register.
 void buildStarted(BuildEvent event)
          Empty.
 java.lang.String getDebugLog()
          All messages with logLevel == Project.MSG_DEBUG or more severe.
 java.lang.String getErrLog()
          All messages with logLevel == Project.MSG_ERR.
 java.lang.String getInfoLog()
          All messages with logLevel == Project.MSG_INFO or more severe.
 java.lang.String getVerboseLog()
          All messages with logLevel == Project.MSG_VERBOSE or more severe.
 java.lang.String getWarnLog()
          All messages with logLevel == Project.MSG_WARN or more severe.
 void messageLogged(BuildEvent event)
          Record the message.
 void targetFinished(BuildEvent event)
          Empty.
 void targetStarted(BuildEvent event)
          Empty.
 void taskFinished(BuildEvent event)
          Empty.
 void taskStarted(BuildEvent event)
          Empty.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REFERENCE_ID

public static final java.lang.String REFERENCE_ID
See Also:
Constant Field Values
Constructor Detail

LogCapturer

public LogCapturer(Project p)
Method Detail

getErrLog

public java.lang.String getErrLog()
All messages with logLevel == Project.MSG_ERR.


getWarnLog

public java.lang.String getWarnLog()
All messages with logLevel == Project.MSG_WARN or more severe.


getInfoLog

public java.lang.String getInfoLog()
All messages with logLevel == Project.MSG_INFO or more severe.


getVerboseLog

public java.lang.String getVerboseLog()
All messages with logLevel == Project.MSG_VERBOSE or more severe.


getDebugLog

public java.lang.String getDebugLog()
All messages with logLevel == Project.MSG_DEBUG or more severe.


buildStarted

public void buildStarted(BuildEvent event)
Empty.


targetStarted

public void targetStarted(BuildEvent event)
Empty.


targetFinished

public void targetFinished(BuildEvent event)
Empty.


taskStarted

public void taskStarted(BuildEvent event)
Empty.


taskFinished

public void taskFinished(BuildEvent event)
Empty.


buildFinished

public void buildFinished(BuildEvent event)
De-register.


messageLogged

public void messageLogged(BuildEvent event)
Record the message.