ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: [Patch] Logging in dynamic tasks
Date Sat, 15 Sep 2001 04:04:36 GMT
Applied thanks!

On Sat, 15 Sep 2001 04:19, Garrick Olson wrote:
> I noticed that when a task is created using taskdef, all messages were
> being logged against the target.
>
> Index: UnknownElement.java
> ===================================================================
> RCS file:
> /home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/UnknownElement.ja
>v a,v
> retrieving revision 1.9
> diff -u -r1.9 UnknownElement.java
> --- UnknownElement.java	2001/08/19 05:52:00	1.9
> +++ UnknownElement.java	2001/09/14 18:01:46
> @@ -101,7 +101,13 @@
>              throw new BuildException("Could not create task of type: "
>                                       + elementName, location);
>          }
> -        realTask.execute();
> +
> +        try {
> +            project.fireTaskStarted(realTask);
> +            realTask.execute();
> +        } finally {
> +            project.fireTaskFinished(realTask, null);
> +        }


-- 
Cheers,

Pete

*------------------------------------------------*
| The student who is never required to do what   |
|  he cannot do never does what he can do.       |
|                       - John Stuart Mill       |
*------------------------------------------------*

Mime
View raw message