ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Proposal: XML output from ant tasks
Date Fri, 25 Feb 2000 08:45:34 GMT
> So, the log facility is a simple XML document, which is constructed by the
> various tasks, and dumped to a log file at the end of the run.  Slightly
> overkill, but easy to implement.
> Now lets see if we can simplify it a bit.
> We can certainly make the superclass of all Tasks construct the default
> node for the task, and populate its attributes by introspecting the object
> at execution time.  (Actually, since this requires us to write getters a
> lazier approach would be to modify the ProjectHelper).
> We could also define a few convenience methods construct and insert simple
> elements with zero, one, or two attributes.  These convenience methods
> could also choose to optionally write this information to System.out in a
> convenient and easy to read format.
> Simple to implement, easy to use, and powerful.


Right now we have:
 project.log( "Copy foo to bar") 

I don't think we need to go so far and use DOM or introspection or "few"
methods to just display:

 <log:copy src="foo" dst="bar" status="success" id="xyz" />

I think Duncan's solution is perfect for this problem. 

Just have 2 methods, one that will log to the console in plain text and
one that will print xml.

It's much better to be able to display the "english" message on console (
and it will be very hard to extract english from  DOM :-), and give each
task the posibility to log in XML format.

In the general case probably you're right, but I see nothing wrong with:

logXml( "xml-log" );
message("Error in foo ");


View raw message