>The reason seem to be (but I haven't been able to confirm as I
>have been busy in other matters) that the Task has a default
>constructor (that I use). To use the 'log()' method, I'd need
>to invoke a constructor with the node name I want to use.
Task [1] is an abstract class not providing a constructor. Same for
ProjectComponent [2].
>Smthg like :
> public MyTask()
> {
> super("com.cpy_name.pckg.MyTask");
This super-constructor does not exist. Only a super(projectReference).
>If that is the case, the constructor could use the following
>definition :
>logger = Logger.getLogger(this.getClass());
Seems like Log4J syntax.
We dont use Log4J (directly). Logging inside Ant is done via its own
logging methods - implemented
in Project [3].
Task implements a log method which delegates to project. Project
delegates to all registered Loggers
and Listeners. A Log4J-Listener is one possibility ... but standard is
simply STDOUT.
Jan
[1]
http://svn.apache.org/repos/asf/ant/core/trunk/src/main/org/apache/tools
/ant/Task.java
[2]
http://svn.apache.org/repos/asf/ant/core/trunk/src/main/org/apache/tools
/ant/ProjectComponent.java
[3]
http://svn.apache.org/repos/asf/ant/core/trunk/src/main/org/apache/tools
/ant/Project.java
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]