----- Original Message ----- From: "James Duncan Davidson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 11, 2001 22:25 Subject: Re: [PATCH] Wait and Available (Updated)
> On 1/8/01 11:46 PM, "Peter Donald" <[EMAIL PROTECTED]> wrote: > > > Or alternatively we could replace System.out with a custom PrintStream that > > checked a ThreadLocalVariable to see which task it is associated with. This > > 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. Cool. > 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. -Steve
