ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy Lambert <anto...@gmx.de>
Subject Re: Recording tasks output while silencing stdout
Date Mon, 07 Dec 2009 13:38:26 GMT
Hello Francis,

you might want to write your own logger, and start ant specifying your 
logger on the command line.

This way, you can handle output the way you want.

Regards,

Antoine

Francis GALIEGUE wrote:
> Hello everyone,
>
> I have a system which works OK, but now I want to go a step further
> and record the output to log files but silence stdout. In fact, I want
> to obtain something like the KBuild output which just outputs some
> things like:
>
> CC somefile.o
> CC someotherfile.o
> LINK libsomething.o
>
> ant -emacs hides the [taskname], which is good. But I cannot obtain
> the tasks themselves to go silent, which I don't want. I know how to
> record the output using the <record> task. I know I could also use
> <exec> and record the output, but I'd like to avoid that...
>
> I can already silence <cvs> with reallyquiet=true, but I cannot
> silence any other tasks. Here is an example of what I'd like to
> silence:
>
>     <target name="copy-sources" depends="download">
>         <mkdir dir="${flat.sources}"/>
>         <for list="${modulelist}" param="module">
>             <sequential>
>                 <if>
>                     <available file="${cvsdir}/@{module}/src" type="dir"/>
>                     <then>
>                         <copy todir="${flat.sources}" includeemptydirs="false">
>                             <fileset dir="${cvsdir}/@{module}/src"
>                                     includes="**/*.java"/>
>                         </copy>
>                     </then>
>                 </if>
>             </sequential>
>         </for>
>     </target>
>
> <record> won't help, since while it will record in a file, it will
> also echo to stdout...
>
> Any hints?
>
>   


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


Mime
View raw message