ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <jakarta-...@ehatchersolutions.com>
Subject Re: Subelements and logging
Date Fri, 07 Jun 2002 19:01:40 GMT
Nevermind.... this trick doesn't apply to sub-elements, only to tasks.
Stefan's suggestion is the way to have direct easy access to Ant's logging
capabilities in sub-elements.

My preference would be to use a different pattern such that sub-elements
have no dependency on Ant classes or API's at all - and develop a way for
your task and sub-elements to communicate with one another for logging.

    Erik



----- Original Message -----
From: "Erik Hatcher" <jakarta-ant@ehatchersolutions.com>
To: "Ant Developers List" <ant-dev@jakarta.apache.org>
Sent: Friday, June 07, 2002 2:55 PM
Subject: Re: Subelements and logging


> Would implementing a setProject method work for sub-elements?  It works
for
> tasks that don't extend from Task, but I'm guessing this would probably
work
> for other types too.  That would keep the Ant dependency off your
> inheritance hierarchy, at least.
>
>     Erik
>
> ----- Original Message -----
> From: "Stefan Bodewig" <bodewig@apache.org>
> To: <ant-dev@jakarta.apache.org>
> Sent: Friday, June 07, 2002 2:25 AM
> Subject: Re: Subelements and logging
>
>
> > On Thu, 6 Jun 2002, Erik Hatcher <jakarta-ant@ehatchersolutions.com>
> > wrote:
> >
> > > The best way to output messages is to use the log() methods that are
> > > part of Task.
> >
> > Another option is to extend from ProjectComponent (which means you
> > class is no longer independent of Ant and can't have a different
> > super-class, of course) and use getProject().log().
> >
> > Stefan
> >
> > --
> > To unsubscribe, e-mail:
<mailto:ant-dev-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
<mailto:ant-dev-help@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message