ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Why does the echo task output to System.out? (Was: RE: [submi t] I ntegration of Ant into Visual Age for Java)
Date Wed, 22 Nov 2000 07:59:08 GMT
Conor MacNeill <conor@m64.com> wrote:

> We are also going to need to handle the case of java classes,
> executed by ant in-VM, which write to System.out. This output should
> be directed to the log with MSG_INFO for System.out and MSG_WARN for
> System.err. We will probably need a LogOutputStream for this. This
> is similar to the LogStreamHandler for java classes run in a
> separate VM.

There already is a LogOutputStream class for exactly this type of
thing. I had modified the java task to support output files shortly
after the release, so it should be quite easy to plug in a
LogOutputStream into it. Other tasks like <junit> may have different
issues.

One thing to note here (<java> task) is that we are going to face the
same problem we had with <echo> in a slightly different way. This task
has a outfile attribute to redirect the output - and obviously nobody
ever thought of using the logging system in any other situation - so
it's either write to the file or to Ant's logging system (to ensure it
ends up somewhere where the user can read it).


Stefan

Mime
View raw message