[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.jdt] Re: Ant and logging in headless mode

Laszlo Benedek wrote:
Thomas Friese wrote:
Laszlo Benedek wrote:
I have a headless application that invokes an Ant script thorough the
org.eclipse.ant.core.AntRunner class.
The System.out messages coming from my Ant script don't show up in the
console (dos prompt). The same messages do show up if I run the script
within the Eclipse UI (without AntRunner).

Does anyone know why ?

Do you invoke

eclipse.exe -application ...

or

java -jar startup.jar -application ...

Do you specifically set a logger with AntRunner.addBuildLogger() - e.g.
the org.apache.tools.ant.DefaultLogger?

Thomas

Yep, that was it. I added the line AntRunner.addBuildLogger("org.apache.tools.ant.DefaultLogger") and now the System.out show up in the console.
Thanks.

Hmm, after paying attention to the output, I've noticed that the messages are still not showing up.
I have a bunch of other messages among which the Ant ones suppose to appear, and that made me think it worked.
Sorry for the confusion.
So, going back to your question.
I'm using "java -jar startup.jar -application ..." to start the application. Now I'm setting the logger, AntRunner.addBuildLogger("org.apache.tools.ant.DefaultLogger")
but still nothing.