Use a build listener to direct messages whereever you need them to.
        Project.addBuildListener(new DefaultLogger())
will do the job. Maybe you have to set the PrintStreams on the
DefaultLogger also.

Hiran Chaudhuri


-----Original Message-----
From: Hans Schwaebli [mailto:[EMAIL PROTECTED] 
Sent: Dienstag, 22. August 2006 09:58
To: user@ant.apache.org
Subject: How to enable logging when using Ant programatically?

I am using some Ant tasks programatically like:
    ReplaceRegExp r = new ReplaceRegExp();
  r.setProject(new Project());
  r.setFile(file);
  r.setFlags("");
  r.setMatch(removal);
  r.setReplace("-- removed line");
  r.execute();

  How can I enable logging? If I execute the program, which uses these
lines above, the task works but I don't see any logging on the console.

 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to