Dashboard > CruiseControl > Home > AntDirectXmlLogger
AntDirectXmlLogger Log In | Sign Up   View a printable version of the current page.

Added by Michael Kloss , last edited by Michael Kloss on Jun 06, 2006  (view change)
Labels: 
(None)

Alternative Ant Xml Logger

As for the problem that the Ant Xml Logger writes out only at the end of the process to get the exact time
that each task needed to run, you often run into the problem that you build hangs, but you haven't got any
idea why or at which target in your build script.

The DirectXmlLogger (haven't found a better name ) does not write the build time in the log file, but
flushes the file immediately, so that you can always see, how far your script was running.

To use the logger configure your cc-ant-plugin as follows:

<project name="MyProject">
   ...
   <ant loggerclassname="org.apache.tools.ant.DirectXmlLogger" uselogger="true" ... />
   ...
</project>

Be sure to have the attached jar-file in your classpath, e.g. the

${ANT_HOME}/lib
directory.

Note

The jar has also the source included. Do not wonder about the package, I had to use this package to use the DefaultLogger-methods.

Have you considered submitting this to Ant?

Not yet, but maybe worth a try...

Our approach to fixing this was to use Ant's RECORD taskat the beginning of the build. 

 CC passes in a fully qualified file name as a property. The ant script starts logging to the file specified (and only if it's specified -- it serves as the on/off switch too) anything at an info level or above.

 Our CC build emails are fairly terse, and we publish the detailed log as a build artifact.   You can tail the log during a build too.

Powered by a free Atlassian Confluence Open Source Project / Non-profit License granted to ThoughtWorks, Inc.. Evaluate Confluence today.
Powered by Atlassian Confluence 2.7.1, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators