Erik Hatcher wrote:
> Wu, Sherry wrote:
> 
>> I tried to modify XmlLogger.java. 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.
http://cvs.apache.org/viewcvs.cgi/jakarta-alexandria/proposal/vindico/src/java/org/apache/alexandria/ant/XMLListener.java?rev=HEAD&content-type=text/vnd.viewcvs-markup

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


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to