Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@jakarta.apache.org Received: (qmail 50376 invoked by uid 500); 27 Jul 2001 06:55:00 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: ant-dev@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 50367 invoked from network); 27 Jul 2001 06:54:58 -0000 From: "Conor MacNeill" To: Subject: RE: TaskContainer and logging Date: Fri, 27 Jul 2001 17:00:09 +1000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 In-Reply-To: Importance: Normal X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N > From: Stefan Bodewig [mailto:bodewig@apache.org] > > DefaulLogger is safe, as far as I can tell, it just uses information > from the current BuildEvent directly, but XmlLogger is a completely > different issue. Agreed. > > In order to know which parent element a given task element should be > attached to, the logger would have to ask either the Task itself or > the BuildEvent - in the case of neither the Thread instance > nor the Task last started and not closed will work. > > There is no chance the BuildEvent could know the parent, unless the > task itself would know its parent, I hope I'm just too blind to see > it, as I wouldn't want to add get/setParent to Task just to enable > logging (even though get/setOwningTarget is probably there for much > the same reason only). First question I have is whether we could just flatten the tasks within the Target and report them that way. The task relationships within the target could potentially be ignored for logging. That would mean we don't need to care about the parent relationship. In any case, the taskElement and taskStartTime needs to be changed from a single variable into a Map. We probably need to sort on task start time in the targetFinished method. Other than that we may need to add the parent reference (A TaskContainer). I can't see any harm, even if it just to support logging. It may make OwningTarget redundant. I'll look into it a bit more tonight. As Peter has said, many loggers retain state assuming a serial task execution flow. These are going to break in the face of TaskContainers. So, we are going to have put some sort of warning about that in WHATSNEW file. Conor