ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jful...@ruminate.co.uk
Subject redirecting build output to a log file
Date Mon, 27 Sep 2004 14:09:28 GMT
"Ashutosh Kumar" <ashutosh.kumar@ionidea.com> 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>

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

then use another task to start it up...

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

or perhaps you want to control this from the commandline

ant -logger org.apache.tools.ant.XmlLogger -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
>  


Mime
View raw message