Re: Capture Javac output

2005-03-02 Thread Andre Dantas Rocha
I'm trying to use DefaultLogger and my implementation is shown below. The log file is created but still empty after javac task run. Any ideas? Thanks Project project = new Project(); DefaultLogger logger; try { logger = new DefaultLogger(); FileOutputStream fo = new Fi

RE: Capture Javac output

2005-03-02 Thread Andre Dantas Rocha
I'm trying to work with DefaultLogger, and created this code: Project project = new Project(); DefaultLogger logger; try { logger = new DefaultLogger(); FileOutputStream fo = new FileOutputStream(new File("build.log")); logger.setOutputPrintStream(new PrintStream(fo

Re: Capture Javac output

2005-03-02 Thread OpenLDAP User
You may want to look at the Record task as well. You could probably start one of those off programmatically. This will log to a file. > > Hi, > > I'm compiling some java files using an Ant project: > > Project project = createProject(); > Javac javac = (Javac) project.createTask("javac"); > ja

RE: Capture Javac output

2005-03-02 Thread Dominique Devienne
Right, I agree. However, in case you persist in the programmatic way, have a look at BuildLogger and BuildListener, and how they are hooked up to the Project. You could use DefaultLogger, setting the output and error PrintStream to your file, achieving what you want. --DD > -Original Message--

RE: Capture Javac output

2005-03-02 Thread Anderson, Rob (Global Trade)
March 02, 2005 7:50 AM > To: user > Subject: Capture Javac output > > > Hi, > > I'm compiling some java files using an Ant project: > > Project project = createProject(); > Javac javac = (Javac) project.createTask("javac"); > javac.init(); &g

Capture Javac output

2005-03-02 Thread Andre Dantas Rocha
Hi, I'm compiling some java files using an Ant project: Project project = createProject(); Javac javac = (Javac) project.createTask("javac"); javac.init(); ... javac.perform(); And would like to capture the output messages in a log file. How can I do that? Thanks, André ___