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:32:32 GMT
It depends on when you want logging to occur.  During
configuration/population?  Or after your execute() method is invoked?

If during configuration and using addConfiguredXXX then extending from
ProjectComponent seems like a good solution.  If during execute then there
are other tricks you could employ, like having a method on your tsk that
logs and pass a reference of your task to the sub-elements to call - or
something like that.

    Erik




----- Original Message -----
From: "Kyle Adams" <kadams@gfs.com>
To: <ant-dev@jakarta.apache.org>
Sent: Friday, June 07, 2002 3:15 PM
Subject: Re: Subelements and logging


If I wasn't using the addConfiguredXXXX methods, I could pass the task into
the constructor, but since that route won't work for me, I'm guessing I'll
have to be dependent on Ant classes.

Does this sound correct to you guys?

Kyle

>>> jakarta-ant@ehatchersolutions.com 06/07/02 03:01PM >>>
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


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