Thank you! It works.
  

Antoine Levy-Lambert <[EMAIL PROTECTED]> wrote:
  Hello Hans,

add this to your code :
r.getProject().addBuildListener(createLogger());
private static BuildLogger createLogger() {
BuildLogger logger = null;
logger = new DefaultLogger();
logger.setMessageOutputLevel(Project.MSG_VERBOSE);
logger.setOutputPrintStream(System.out);
logger.setErrorPrintStream(System.err);
logger.setEmacsMode(false);
return logger;
}
Regards,
Antoine



On Aug 22, 2006, at 10:58 AM, Hans Schwaebli wrote:

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



                
---------------------------------
Stay in the know. Pulse on the new Yahoo.com.  Check it out. 

Reply via email to