ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Voigt" <tv_spam...@gmx.de>
Subject Corrupted logfiles
Date Mon, 15 Jan 2007 16:15:08 GMT
Hi,

I had a curious problem that took me some time to figure out. The problem is fixed on my side,
but you may want to check it out anyway. (I filed a bug in the bugzilla database, Bug 41368.)

The setup is as follows: 
We compile a list of java projects, logging the output of each project. Here a project equals
a subdir. No parallelization this time. The basic setup for each project is as follows:
---------------
<target name="parent">
<property name="JavaLog" value="${JavaLogDir}/${Project}.log"/>
<record name="${JavaLog}" action="start" loglevel="info"/>

<antfetch dir="[...]" target="child"/>

<record name="${JavaLog}" action="stop"/>
</target>
---------------

Now the child target tried to write to the same logfile, basically calling 
----------------
<target name="child">
<record name="${JavaLog} " action="start" append="true"/>
[...]
<record name="${JavaLog} " action="stop"/>
----------------

In Ant 1.6.5 no one noticed, because the output looked fine. Starting with ant 1.7.0 however
the output becomes strange: After the "stop" in the parent target the logfile is empty (contains
zero bytes). If I insert a fail immediately before the "stop" command in the parent target
then everything is fine. If I do not close the log file at all (in the parent target) then
 the logfile is there - in some cases. In other cases it contains the last line of the output,
or sometimes nothing at all, and a lot of binary zeros. Seems like the content of the logfile
is overwritten with zeros before it is flushed. 

Regards, Thomas


-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

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


Mime
View raw message