ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wu, Sherry" <>
Subject RE: custom ant logger
Date Wed, 16 Oct 2002 21:43:22 GMT
Thanks. I got the following exceptions when I run "ant -listener
org.apache.alexandria.ant.XMLListener -Dvindico.logfile=log.xml", any idea?

at Method) 	
at org.apache.alexandria.ant.XMLListener.buildStarted(

at  Total time: 58 seconds 

at org.apache.alexandria.ant.XMLListener.buildFinished(


-----Original Message-----
From: Nicola Ken Barozzi []
Sent: Wednesday, October 16, 2002 2:14 AM
To: Ant Users List
Subject: Re: custom ant logger

Erik Hatcher wrote:
> 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 :))

Scott Sanders made one for Vindico that is lying in Alexandria CVS.
He said IIRC that it's better than current Ant one.

Nicola Ken Barozzi         
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)

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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message