ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ron Coutts" <R...@quadrus.com>
Subject 'Record' task does not seem to flush print buffer
Date Fri, 04 Jan 2002 18:51:08 GMT
I'm using the Record task to record some build output, and when the
build is done, I stop recording and then copy the log file from the
local machine to a remote machine as the code snippet below shows.  The
problem is that the remote machine gets an *incomplete* version of the
log file, while the local machine has a complete version of the log
file.  This suggests that the print buffer of the Record task is not
being flushed before the Copy task is executed.  
I've checked the docs for the Record task, which states 'the file's
print stream is flushed for "finished" events (buildFinished,
targetFinished and taskFinished), and is closed on a buildFinished
event'.  My interpretation of this is that the buffer should be flushed
when the recording is stopped, i.e. the Record task has finished.  I've
even tried putting the start-recording, build, and stop-recording
sequence in a separate target, but the problem remained.  
Anyone have any ideas?
Ron

<property name="LogFileName"  value="LogFile.txt" />

<echo message="Start recording to file '${LogFileName}'" />
<record name="${LogFileName}" action="start" />

<!-- do some build stuff here - ommitted for clarity -->

<record name="${LogFileName}" action="stop" />
<echo message="Stopped recording to file '${LogFileName}'" />

<!-- copy the log file and the email content file to a backed-up machine
-->
<copy todir="${RemoteLogsDir}" overwrite="false">
  <fileset dir="${LocalLogsDir}" casesensitive="false" >
    <include name="${LogFileName}"/>
  </fileset>
</copy>

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message