Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 13219 invoked from network); 14 Jan 2005 20:15:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 14 Jan 2005 20:15:51 -0000 Received: (qmail 6518 invoked by uid 500); 14 Jan 2005 20:15:50 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 6164 invoked by uid 500); 14 Jan 2005 20:15:49 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 6147 invoked by uid 99); 14 Jan 2005 20:15:48 -0000 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_50_60,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of carej@us.ibm.com designates 32.97.110.132 as permitted sender) Received: from e34.co.us.ibm.com (HELO e34.co.us.ibm.com) (32.97.110.132) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 14 Jan 2005 12:15:47 -0800 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e34.co.us.ibm.com (8.12.10/8.12.9) with ESMTP id j0EKFi9g074032 for ; Fri, 14 Jan 2005 15:15:44 -0500 Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d03relay04.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j0EKFhls310578 for ; Fri, 14 Jan 2005 13:15:43 -0700 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id j0EKFhCu015722 for ; Fri, 14 Jan 2005 13:15:43 -0700 Received: from d03mc015.boulder.ibm.com (d03mc015.boulder.ibm.com [9.17.195.29]) by d03av04.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id j0EKFh6v015715 for ; Fri, 14 Jan 2005 13:15:43 -0700 In-Reply-To: <20050114100923.29765.qmail@minotaur.apache.org> To: "Ant Developers List" MIME-Version: 1.0 Subject: Re: cvs commit: ant/src/main/org/apache/tools/ant Project.java X-Mailer: Lotus Notes Release 6.0.2CF1 June 9, 2003 From: Jeffrey E Care Message-ID: Date: Fri, 14 Jan 2005 15:15:43 -0500 X-MIMETrack: Serialize by Router on D03MC015/03/M/IBM(Release 6.51HF338 | June 21, 2004) at 01/14/2005 13:15:42, Serialize complete at 01/14/2005 13:15:42 Content-Type: multipart/alternative; boundary="=_alternative 006F4EA285256F89_=" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N --=_alternative 006F4EA285256F89_= Content-Type: text/plain; charset="US-ASCII" Would it not be better to do something like this: if (loggingMessage) { PrintStream tempErr = new PrintStream (new FileOutputStream (FileDescriptor.err)); tempErr.println (message); } That way the message is not swallowed & lost? -- Jeffrey E. Care (carej@us.ibm.com) WebSphere Build SWAT Team Lead WebSphere Build Tooling Lead (Project Mantis) https://w3.opensource.ibm.com/projects/mantis bodewig@apache.org wrote on 01/14/2005 05:09:23 AM: > bodewig 2005/01/14 02:09:23 > > Modified: src/main/org/apache/tools/ant Project.java > Log: > Silently ignore messages being written to System.err/out while a > Listener is processing a different message > > Revision Changes Path > 1.183 +15 -5 ant/src/main/org/apache/tools/ant/Project.java > > Index: Project.java > =================================================================== > RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/Project.java,v > retrieving revision 1.182 > retrieving revision 1.183 > diff -u -r1.182 -r1.183 > --- Project.java 10 Jan 2005 23:44:57 -0000 1.182 > +++ Project.java 14 Jan 2005 10:09:23 -0000 1.183 > @@ -1982,10 +1982,20 @@ > } > synchronized (this) { > if (loggingMessage) { > - throw new BuildException("Listener attempted to access " > - + (priority == MSG_ERR ? "System.err" : "System.out") > - + " with message [" + message > - + "] - infinite loop terminated"); > + /* > + * One of the Listeners has attempted to access > + * System.err or System.out. > + * > + * We used to throw an exception in this case, but > + * sometimes Listeners can't prevent it(like our own > + * Log4jListener which invokes getLogger() which in > + * turn wants to write to the console). > + * > + * @see http://marc.theaimsgroup.com/? > t=110538624200006&r=1&w=2 > + * > + * We now (Ant 1.7 and 1.6.3) simply swallow the message. > + */ > + return; > } > try { > loggingMessage = true; > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org > For additional commands, e-mail: dev-help@ant.apache.org > --=_alternative 006F4EA285256F89_=--