Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 5516 invoked from network); 1 Mar 2006 17:22:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Mar 2006 17:22:39 -0000 Received: (qmail 76613 invoked by uid 500); 1 Mar 2006 17:23:07 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 76521 invoked by uid 500); 1 Mar 2006 17:23:07 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 76486 invoked by uid 99); 1 Mar 2006 17:23:07 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Mar 2006 09:23:07 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [80.65.237.46] (HELO musset.eptica.com) (80.65.237.46) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Mar 2006 09:23:06 -0800 Received: from [10.1.0.132] (unknown [80.65.237.41]) by musset.eptica.com (Postfix) with ESMTP id 32D6C7D17 for ; Wed, 1 Mar 2006 18:22:30 +0100 (CET) Message-ID: <4405D862.7000008@apache.org> Date: Wed, 01 Mar 2006 18:22:42 +0100 From: Emmanuel Bourg User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: Jakarta Commons Developers List Subject: Re: [logging] JCL2.0 design - API References: <1140391781.3813.150.camel@localhost.localdomain> <43F98DD7.6050104@gmx.net> <44057514.4040209@apache.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Craig McClanahan wrote: >> It's possible to keep a Log interface and having one less class to >> import by adding a static class in the Log interface. It would look like >> this: >> >> Log log = Log.Factory.getLog("foo"); >> > > I presume this would be implemented by making "Factory" a static variable? > That doesn't offer much protection against malicious applications trying to > replace it and potentially messing up other users. There is no variable, this would be implemented with a static inner class in the Log interface, something like this: public interface Log { ... public static class Factory { public static Log getLog(String name) { ... } } } Emmanuel Bourg --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org