ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <>
Subject Re: [PATCH] Wait and Available (Updated)
Date Fri, 12 Jan 2001 22:41:12 GMT

----- Original Message -----
From: "James Duncan Davidson" <>
To: <>
Sent: Thursday, January 11, 2001 22:25
Subject: Re: [PATCH] Wait and Available (Updated)

> On 1/8/01 11:46 PM, "Peter Donald" <> wrote:
> > Or alternatively we could replace System.out with a custom PrintStream
> > checked a ThreadLocalVariable to see which task it is associated with.
> > sort of trick is oftend used in servlet/ejb containers.
> There we go... :) That's the ticket. With a bit of buffer up on the end of
> that custom PrintStream, we can sort the output into the right blocks.

You know, I've been thinking for a while about the feasibility of teasing
out the logging methods into a separate interface. The reason for that is
more and more tasks use separate classes (such as the new Javac framework)
to implement the real functionality, and these classes keep on being given
references back to the original task or project for the logging.

If there was a separate interface for logging (called say Logger) then
ant.Project and ant.Task could both interface it, the latter forwarding
calls to the interface stored in a task variable -which would be the project
by default. For something involving parallelisation, some other interface
could be assigned to that task which would log differently.

One of the benefits of this approach would be that we could execute many of
the ant tasks without having the rest of the framework in place -which would
make it easier for other programs to re-use these elements.

I'm going to try coding up the soap proxy code generation task this w/end,
using the javac design as a basis; I'll try out the notion of splitting out
logging to see if it is viable and adequate.


View raw message