There is a <record> task in Ant so you could save the Ant output during the Ant Build. Here is an example.
1. build.xml
<project name="ant-recorder-example" default="record" basedir=".">
<target name="record">
<record name="${basedir}/build.log" action="start" append="yes"/>
<!--
Whatever ant tasks being executed here,
the output would be recorded by the recorder
-->
<echo message="Hello world"/>
<echo message="All the above output will be recorded down in the build.log."/>
<echo message="After the run, check the build.log."/>
<record name="${basedir}/build.log" action="stop" append="yes"/>
</target>
</project>
Done =)
Reference: Ant – Recorder Task


