ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conor MacNeill <>
Subject Re: How grab output to "System.out"?
Date Fri, 30 Jan 2004 06:05:37 GMT
On Fri, 30 Jan 2004 04:37 pm, Robert Paris wrote:
> Thanks. If I'm instantiating it through the Project class, how would I add
> my own logger? i've already added a BuildListener but that doesn't grab the
> "System.out" prints from the test program. I'm assuming if I set my logger
> as the default one, it will send that there?

Did you miss my earlier reply on this? To capture System.out, you can do what 
Ant's Main class does

System.setOut(new PrintStream(new DemuxOutputStream(project, false)))

you may want to redirect System.err as well. Also you should probably save and 
restore the original values.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message