ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: custom ant logger
Date Wed, 16 Oct 2002 09:01:32 GMT
Wu, Sherry wrote:
> I tried to modify Instead of flushing the log in
> buildFinished(),
> I did it in taskFinished(). This solved the our of memory problem. But some
> of
> the tags (e.g. build, build time, target ...) are lost in the output
> log.xml.

There is buffering going on in there that you'd have to adjust for also.

> e.g. 
> unzip error, ANT gives a message like this "-------:163:Errror while
> expanding-----"
> copy error, ANT gives a message like this  "------ Warning: Could not find
> file----"
> file not exist ANT gives a message like this "------ does not exist"
> We had to look for these exact words in our script to capture these errors.
> The script does
> not capture the error if the error message is new.

The BuildEvent that gets passed to the BuildLogger methods has an 
exception attached to it.  If its not null then there was an error.  You 
should not have to do any text matching to determine if there is an 
error.  Some tasks will also log informational messages which may "look" 
like errors but are not show stoppers - these come through messageLogged 
instead of the other methods.

Good luck.  And if you come up with a better XmlLogger, by all means 
share :))


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message