com.nokia.ant.taskdefs
Class TextLogRecorderEntry

java.lang.Object
  extended by com.nokia.ant.taskdefs.TextLogRecorderEntry
All Implemented Interfaces:
java.util.EventListener, org.apache.tools.ant.BuildListener, org.apache.tools.ant.SubBuildListener

public class TextLogRecorderEntry
extends java.lang.Object
implements org.apache.tools.ant.SubBuildListener

This is a class that represents a recorder. This is the listener to the build process.

Since:
Ant 1.4

Constructor Summary
protected TextLogRecorderEntry(java.lang.String name)
           
 
Method Summary
 void buildFinished(org.apache.tools.ant.BuildEvent event)
          .
 void buildStarted(org.apache.tools.ant.BuildEvent event)
          .
 void cleanup()
           
 void closeFile()
          Closes the file associated with this recorder.
 java.lang.String getFilename()
           
 void messageLogged(org.apache.tools.ant.BuildEvent event)
          .
 void openFile(boolean append)
          Initially opens the file associated with this recorder.
 void reopenFile()
          Re-opens the file associated with this recorder.
 void setEmacsMode(boolean emacsMode)
          .
 void setErrorPrintStream(java.io.PrintStream err)
           
 void setFilterSet(LogFilterSet o)
           
 void setMessageOutputLevel(int level)
          .
 void setOutputPrintStream(java.io.PrintStream output)
           
 void setProject(org.apache.tools.ant.Project project)
          Set the project associated with this recorder entry.
 void setRecordState(boolean state)
          Turns off or on this recorder.
 void setRegexp(java.lang.String regexp)
           
 void subBuildFinished(org.apache.tools.ant.BuildEvent event)
          Cleans up any resources held by this recorder entry at the end of a subbuild if it has been created for the subbuild's project instance.
 void subBuildStarted(org.apache.tools.ant.BuildEvent event)
          Empty implementation to satisfy the BuildListener interface.
 void targetFinished(org.apache.tools.ant.BuildEvent event)
          .
 void targetStarted(org.apache.tools.ant.BuildEvent event)
          .
 void taskFinished(org.apache.tools.ant.BuildEvent event)
          .
 void taskStarted(org.apache.tools.ant.BuildEvent event)
          .
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextLogRecorderEntry

protected TextLogRecorderEntry(java.lang.String name)
Parameters:
name - The name of this recorder (used as the filename).
Method Detail

getFilename

public java.lang.String getFilename()
Returns:
the name of the file the output is sent to.

setRecordState

public void setRecordState(boolean state)
Turns off or on this recorder.

Parameters:
state - true for on, false for off, null for no change.

setRegexp

public void setRegexp(java.lang.String regexp)

setFilterSet

public void setFilterSet(LogFilterSet o)

buildStarted

public void buildStarted(org.apache.tools.ant.BuildEvent event)
.

Specified by:
buildStarted in interface org.apache.tools.ant.BuildListener

buildFinished

public void buildFinished(org.apache.tools.ant.BuildEvent event)
.

Specified by:
buildFinished in interface org.apache.tools.ant.BuildListener

subBuildFinished

public void subBuildFinished(org.apache.tools.ant.BuildEvent event)
Cleans up any resources held by this recorder entry at the end of a subbuild if it has been created for the subbuild's project instance.

Specified by:
subBuildFinished in interface org.apache.tools.ant.SubBuildListener
Parameters:
event - the buildFinished event
Since:
Ant 1.6.2

subBuildStarted

public void subBuildStarted(org.apache.tools.ant.BuildEvent event)
Empty implementation to satisfy the BuildListener interface.

Specified by:
subBuildStarted in interface org.apache.tools.ant.SubBuildListener
Parameters:
event - the buildStarted event
Since:
Ant 1.6.2

targetStarted

public void targetStarted(org.apache.tools.ant.BuildEvent event)
.

Specified by:
targetStarted in interface org.apache.tools.ant.BuildListener

targetFinished

public void targetFinished(org.apache.tools.ant.BuildEvent event)
.

Specified by:
targetFinished in interface org.apache.tools.ant.BuildListener

taskStarted

public void taskStarted(org.apache.tools.ant.BuildEvent event)
.

Specified by:
taskStarted in interface org.apache.tools.ant.BuildListener

taskFinished

public void taskFinished(org.apache.tools.ant.BuildEvent event)
.

Specified by:
taskFinished in interface org.apache.tools.ant.BuildListener

messageLogged

public void messageLogged(org.apache.tools.ant.BuildEvent event)
.

Specified by:
messageLogged in interface org.apache.tools.ant.BuildListener

setMessageOutputLevel

public void setMessageOutputLevel(int level)
.


setOutputPrintStream

public void setOutputPrintStream(java.io.PrintStream output)
Parameters:
output - Output print stream

setEmacsMode

public void setEmacsMode(boolean emacsMode)
.


setErrorPrintStream

public void setErrorPrintStream(java.io.PrintStream err)
Parameters:
err - Error print stream

setProject

public void setProject(org.apache.tools.ant.Project project)
Set the project associated with this recorder entry.

Parameters:
project - the project instance
Since:
1.6.2

cleanup

public void cleanup()
Since:
1.6.2

openFile

public void openFile(boolean append)
Initially opens the file associated with this recorder. Used by Recorder.

Parameters:
append - Indicates if output must be appended to the logfile or that the logfile should be overwritten.
Throws:
org.apache.tools.ant.BuildException
Since:
1.6.3

closeFile

public void closeFile()
Closes the file associated with this recorder. Used by Recorder.

Since:
1.6.3

reopenFile

public void reopenFile()
Re-opens the file associated with this recorder. Used by Recorder.

Throws:
org.apache.tools.ant.BuildException
Since:
1.6.3