Grokbase Groups Ant user August 2009
FAQ

[Ant-user] quiete mode for <cvs, <exec and <xslt, .. or for the whole script

Gilbert Rebhan
Aug 26, 2009 at 8:14 pm

Michael Hüttermann schrieb:
Hello,

how can I use the tasks cvs, exec and xslt in a quiet mode, that the
complete output is only written to a file or totally hidden/deleted?

Or: how can I configure an Ant script to write all its output to a file,
or delete it completely? Then, it has to be configured inside the script,
working with something like "ant > log.txt" does not work in my context.
Hi, Michael

some tasks - f.e. cvs task - have a quiet attribute to reduce noise

two possibilities that will work in any case =

1. ant has different commandline parameters to set the loglevel for the
whole script (default loglevel is info), see =
http://ant.apache.org/manual/running.html#options
f.e. ant -debug ... or ant - quiet ...

2. is the most flexible solution i know of to control the noiselevel
set the loglevel within the antscript and adjust it for your needs
taskdef sources see =
http://marc.info/?l=ant-user&m=115504180503962&w=2

usage =
<!-- reduce noise for section with talkative tasks like cvs or copy
we want only messages with loglevel MSG.error -->
<setloglevel level="error"/>
...
<!-- important section, i want to see ALL -->
<setloglevel level="debug"/>
...
<!-- get back to default loglevel -->
<setloglevel level="info"/>

maybe there are other solutions with ant 1.7.1, i yet don't know of,
after recently switching from ant 1.6.5 to 1.7.1


Regards, Gilbert






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

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 3 | next ›