ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chaudhuri, Hiran" <Hiran.Chaudh...@softwareag.com>
Subject RE: How to enable logging when using Ant programatically?
Date Tue, 22 Aug 2006 12:20:23 GMT
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:hans_schwaebli@yahoo.com] 
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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message