ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: Proposal: XML output from ant tasks
Date Thu, 24 Feb 2000 11:32:50 GMT
costin@eng.sun.com wrote:
> 
> Hi,
> 
> Right now ant has a very nice file format and works great, but if you
> build a large project you'll probably get a lot of messages - some of them
> are warnings ( deprecated methods ), some are important info ( time to
> build, non-critical failures ).
> 
> Also, with conditional compilation we will have some very important
> messages describing what was actualy build into the dist.
> 
> The problem is that it takes time to extract the information, and it is
> hard to automate it.
> 
> One possible solution is ( guess what? ) xml. If we convert all logs to
> display well-formed XML it will be easy to post-process the results
> and even have a nice format.
> 
> The price is not big - the output will still be readable.  It can be an
> incremental job, with log() changed to wrap everything in a generic
> <log:ant > tag with the source and level, and then we can add format to
> the most important messages ( like deprecations, not-fatal warnings,
> conditional compilations, etc).
> 
> What do you think?

I think we already agreed on this... in fact it's already in the todo
list :) (you guys don't read the todo list, do you?)

Anyway, having _just_ XML output would be kinda painful to look at from
the command line... but I agree that something like -xmllog should
trigger the generation of structured content directly from the source.

I see _lots_ of design problems though:

1) a log schema must be established and this is the log format used by
ant itself. To avoid collisions, we should create namespaces for each
task... even if this makes XSLT processing more painful.

2) how do we trigger this? I mean, logs cannot follow the inversion of
control tasks do: ant is called by the log methods, not the other way
around. So there is no way to _force_ the output to be structured but it
depends on task behavior.

I'd hate to see something like this

 if (project.log.isXML()) {
   project.log("<blah>prrrr!</blah>");
 } else {
   project.log("[blah] prrrr!");
 }

using the above example, the answer should be something like

 project.log("blah", "prrrr!");

and the logger takes care of it.... the problem is there are so many
different "log message schemas" that this is not exactly viable....

Another thing would be something like generating DOM fragments and have
compiled in stylesheets that do to-text transformations... but it's
getting far too complex.

When I proposed the idea I thought it was great and simple... after some
reasoning, I don't think implementing something like that is piece of
cake....

What do you think?

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<stefano@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Come to the first official Apache Software Foundation Conference!  
------------------------- http://ApacheCon.Com ---------------------



Mime
View raw message