Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 5176 invoked from network); 30 Jan 2004 06:06:16 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 30 Jan 2004 06:06:16 -0000 Received: (qmail 14909 invoked by uid 500); 30 Jan 2004 06:05:35 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 14735 invoked by uid 500); 30 Jan 2004 06:05:33 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 14609 invoked from network); 30 Jan 2004 06:05:32 -0000 Received: from unknown (HELO mail.syd.swiftdsl.com.au) (202.154.83.58) by daedalus.apache.org with SMTP; 30 Jan 2004 06:05:32 -0000 Received: (qmail 24894 invoked from network); 30 Jan 2004 06:11:35 -0000 Received: from unknown (HELO 192.168.1.5) (218.214.49.176) by mail.syd.swiftdsl.com.au with SMTP; 30 Jan 2004 06:11:35 -0000 From: Conor MacNeill To: "Ant Users List" Subject: Re: How grab output to "System.out"? Date: Fri, 30 Jan 2004 17:05:37 +1100 User-Agent: KMail/1.5.4 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200401301705.37616.conor@cortexebusiness.com.au> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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. Conor --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org