ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@octo.com>
Subject Problem Logging in Tasks
Date Tue, 26 Feb 2002 21:22:41 GMT
Hi,

For some reason the log("xxx", Project.MSG_VERBOSE) code that I have in
my custom tasks do not get logged when I run ant eith the -verbose flag
on. Any idea why ?

I've looked at how others tasks were doing their logging and I can't see
the difference from my code apart from the fact that they are inside
ant.jar/optional.jar.

Here is how I define my task :

<taskdef name="runservertests"
classname="org.apache.cactus.ant.RunServerTestsTask">
  <classpath>
    <pathelement location="${cactus.ant.jar}"/>
    <pathelement path="${java.class.path}"/>
  </classpath>
</taskdef>

Here is a sample of what I do :

public class RunServerTestsTask extends Task
{
    public void init()
    {
        this.startHelper = new StartServerHelper(this);
        this.stopHelper = new StopServerHelper(this);
    }
[...]
}

public class StartServerHelper implements Runnable
{
    private Task task;

    public StartServerHelper(Task theTask)
    {
        this.task = theTask;
    }

    public void execute() throws BuildException
    {
        this.task.log("xxx", Project.MSG_VERBOSE);
[...]


Thanks for your help.
-Vincent

P.S.: I do realize there must be something very obvious but I've been
banging my head for a few hours already and I'm stuck ... :-)



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