From user-return-44893-apmail-ant-user-archive=ant.apache.org@ant.apache.org Tue Aug 03 23:59:49 2004 Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 50377 invoked from network); 3 Aug 2004 23:59:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 3 Aug 2004 23:59:49 -0000 Received: (qmail 33356 invoked by uid 500); 3 Aug 2004 23:59:36 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 33312 invoked by uid 500); 3 Aug 2004 23:59:35 -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 33287 invoked by uid 99); 3 Aug 2004 23:59:35 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [63.116.109.25] (HELO smtp3.akamai.com) (63.116.109.25) by apache.org (qpsmtpd/0.27.1) with ESMTP; Tue, 03 Aug 2004 16:59:32 -0700 Received: from smtp3.akamai.com (vwall2.sanmateo.corp.akamai.com [172.23.1.72]) by smtp3.akamai.com (8.12.10/8.12.10) with ESMTP id i73NxOjB006618 for ; Tue, 3 Aug 2004 16:59:24 -0700 (PDT) Received: from USCA1EX-GATE1.sanmateo.corp.akamai.com (usca1ex-gate1.sanmateo.corp.akamai.com [172.23.1.110]) by smtp3.akamai.com (8.12.10/8.12.10) with ESMTP id i73NxNhI006612 for ; Tue, 3 Aug 2004 16:59:24 -0700 (PDT) Received: from USCA1EX-PRIV1.sanmateo.corp.akamai.com ([172.23.1.113]) by USCA1EX-GATE1.sanmateo.corp.akamai.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 3 Aug 2004 16:59:23 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: Specifying System.out as a file Date: Tue, 3 Aug 2004 16:59:23 -0700 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Specifying System.out as a file Thread-Index: AcR5teTO1CZDz7J0QzeXskQhynHWGw== From: "Chan, Eddy" To: X-OriginalArrivalTime: 03 Aug 2004 23:59:23.0952 (UTC) FILETIME=[E6AF8300:01C479B5] X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi, Is there a way to specify System.out/System.err as a file? I want to = sometimes be able to redirect the error stream to the output stream = within Ant (e.g. exec task). I could use "/dev/stdout" on Linux, but = this unfortunately opens another fd instead of using the fd associated = with System.out, which can cause logging errors when I redirect the = output stream of Ant to a file. The same goes for "/dev/stderr". I = have a workaround, but it is cumbersome. As a demonstration of this behavior, here's a sample build.xml file. Running = test... When you run this without redirection to a file, you will see something = to the effect of: Running test... BUILD SUCCESSFUL Total time: 0 seconds If you run this with redirection to a file, you might see something to = the effect of: BUILD SUCCESSFUL Total time: 0 seconds Notice the missing echo text. Thanks for any help, Eddy --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org