ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Voigt" <tv_spam...@gmx.de>
Subject Problem with ant recorder task
Date Tue, 31 Oct 2006 12:35:33 GMT
Hi,

I've got a problem with the recorder task. Have a look:
------------
	<target name="LogTarget">
		<record name="mylog.log" action="start" append="true"/>
		<echo message="Target: ${target}"/>
		<record name="mylog.log" action="stop"/>
	</target>
	<target name="logtest">
		<antcall target="LogTarget">
			<param name="target" value="mylogtest-1"/>
		</antcall>
		<antcall target="LogTarget">
			<param name="target" value="mylogtest-2"/>
		</antcall>
	</target>
------------
Now I would expect ant to log both calls to the file, however, mylog.log contains just a single
line containing
--------
    [echo] Target: mylogtest-1 
--------
There is a workaround: Define the recorder in the target "logtest". However, that doesn't
help me:
I have to call the target whose output I want to log several times (and I want to log the
output of either all calls, or at least the output of the last call, but certainly not the
output of the first call), and I don't know the name of the log before I call the target,
so I can't define it in advance.

The problem still persists if I put the tasks in separate files and call them using <ant>
(ant not <antcall>).

Is there a way to make this work?

Regards, Thomas

-- 
GMX DSL-Flatrate 0,- Euro* - Überall, wo DSL verfügbar ist!
NEU: Jetzt bis zu 16.000 kBit/s! http://www.gmx.net/de/go/dsl

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


Mime
View raw message