You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Ninju Bohra <ni...@yahoo.com> on 2005/04/14 00:05:27 UTC

Setting log level of the XmlLogger

Hello all,
 
This is a question of how ANT is used by the CruiseControl project (some cross-team synergy here, yea!!).  If you are not using CruiseControl and/ANT this message may not be very useful (but still educational :-) )
 
When CruiseControl kicks off my ant build.xml file, I set the useLogger="false" in my <ant> element it spawns an ANT process with the following command parameters:
 
[cc]Apr-13 17:02:24 AntBuilder    - Executing Command: \\gsu1\gsu1-d\tools\ant\bin\ant.bat -listener org.apache.tools.ant.XmlLogger -DXmlLogger.file=log.xml -Dcclastbuildtimestamp=20050413153327 -Dlabel=build.36 -Dcclastgoodbuildtimestamp=20050413153327 -Dlastbuildsuccessful=false -Dst.cybere.changed=true -Dcvstimestamp=2005-04-13 22:02:07 GMT -Dcctimestamp=
20050413170207 -Dsuperbuild_props_loc=C:/ccbuild/Mainline/superbuild.properties -buildfile build.xml test.build
 
Now the ANT process is invoked using the XmlLogger (in listener mode) to capture the output.  My issue is that the granularity of the data written to the XML output is of a greater detail that what is written to the screen.
 
Looking at the code for the XmlLogger class, I see that the value of the msgOutputLevel attribute is initialized to Project.MSG_DEBUG.  It is this level that is allowing more data to be written to the log file (I believe).
 
Is there any way to set the XmlLogger output level to Project.MSG_INFO from the command line?
 
Thanx,
 
Ninju Bohra


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com