ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <>
Subject RE: TaskContainer and logging
Date Fri, 27 Jul 2001 07:00:09 GMT
> From: Stefan Bodewig []
> 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.


> 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 <parallel> 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.


View raw message