ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject redirecting build output to a log file
Date Mon, 27 Sep 2004 14:09:28 GMT
"Ashutosh Kumar" <> wrote ..
> How can we redirect build output to a log file?
> Regds

u could use the record task....

<target name="start-log">
	<record name="log.txt" action="start" loglevel="debug" append="false"/>

<target name="stop-log">
	<record name="log.txt" action="stop" />

then use another task to start it up...

<target name="build" depends="start,compile,stop">

or perhaps you want to control this from the commandline

ant -logger -debug -logfile logs/build_log.xml -f build.xml

this command line would redirect build output to a logfile under /logs directory (debug level)

hth, Jim Fuller

> Ashutosh

View raw message