ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: two listeners but only different logging
Date Fri, 22 Oct 2010 14:42:31 GMT
On 2010-10-22, ciba wrote:

> I am using two listeners :
> net.sf.antcontrib.perf.AntPerformanceListener
> org.apache.tools.ant.listener.Log4jListener

> I want all print statements other than 'performance statistics' to be
> printed on the console. so that means i cannot use the -logFile option.

> How can we implement this differentiated behaviour of listeners in ant?

I'm afraid you can't because of the way the performance listener is
implemented.  Looking at the code
<http://ant-contrib.svn.sourceforge.net/viewvc/ant-contrib/ant-contrib/trunk/src/main/java/net/sf/antcontrib/perf/AntPerformanceListener.java?view=markup>
you can tell the performance listener to write its information to a file
but there is no way to make it not write to System.out - this means its
output will always end up being sent to the console unless you use a
(different, probably non-existant) logger (not listener) that would
filter out the results.

Stefan

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


Mime
View raw message