ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jose Alberto Fernandez <JFernan...@viquity.com>
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 Tue, 21 Nov 2000 20:51:32 GMT
> From: Conor MacNeill [mailto:conor@m64.com]
> 
> 
> 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.
> 

As a matter of fact, for the particular case of the GUI (which should never
be writing to System.out) one simple solution to all this was to do:

  PrintStream out = gui.getConsoleStream();
  System.setOut(out);

During the setting up of the GUI. In that way all output by any class using
System.out will be sent to the GUI window representing the "console" or
watever you want to call it.

That was one of the things added to the Java API in 1.1 for just this type
of issue.

We may want to have a LogOutputStream, but in reality I do not think that
ANT
needs it, maybe this should be something particular to Antidote.

Jose Alberto

> Conor
> 

Mime
View raw message