Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 24364 invoked from network); 20 Dec 2004 15:30:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 20 Dec 2004 15:30:58 -0000 Received: (qmail 6492 invoked by uid 500); 20 Dec 2004 15:16:36 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 6462 invoked by uid 500); 20 Dec 2004 15:16:36 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: 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 6438 invoked by uid 99); 20 Dec 2004 15:16:36 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from gulcu002.worldcom.ch (HELO mail.qos.ch) (212.74.184.210) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 20 Dec 2004 07:16:33 -0800 Received: from kal.qos.ch (kal [192.168.1.3]) by mail.qos.ch (Postfix) with ESMTP id 8734E1EC077; Mon, 20 Dec 2004 16:25:17 +0100 (CET) Message-Id: <6.0.3.0.0.20041220154754.03c17db8@mail.qos.ch> X-Sender: ceki@mail.qos.ch (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 6.0.3.0 Date: Mon, 20 Dec 2004 16:17:03 +0100 To: "Jakarta Commons Developers List" , commons-dev@jakarta.apache.org From: Ceki =?iso-8859-1?Q?G=FClc=FC?= Subject: Re: [logging] ECL: Log interface vs. abstract class In-Reply-To: References: <1102738033.4039.24.camel@blackbox> <6.0.3.0.0.20041218175610.03a785b0__41157.0719014437$1103391275$gmane$org@mail.qos.ch> <41C615EC.5050307@users.sourceforge.net> <6.0.3.0.0.20041220144818.03a673e8__28601.7019454905$1103550996$gmane$org@mail.qos.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; format=flowed Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Aren't you assuming that things can be placed in nice orthogonal and independent boxes? Let X and Y be logging APIs that JCL attempts to abstract. Let IX be an interface unique to API X. Let JCL-IX be JCL's mirror of interface IX. If the end-user sprinkles her code with JCL-IX calls, there are two possible branches: 1) API X is available, and there no unintended or unforeseen interactions between JCL-IX and IX then everything will be fine. If there are unintended or unforeseen interactions, then this usually takes a long time to discover, let alone to repair. In the mean time, your users will be pulling out their hair in frustration. 2) API X is unavailable. In that case, JCL might may attempt to replace the functionality offered by API X with a NOP implementation or a simple alternative. However, if API X is considered core functionality, then the promise of abstraction cannot be not fulfilled without duplicating the code found in API X. Writing a good facade is much harder than what people realize. In the case of competing and divergent APIs, it is an impossible one. At 03:18 PM 12/20/2004, Matt Sgarlata wrote: >I disagree; different logging APIs can be supported with the addition of=20 >new interfaces. Using this strategy, the set of interfaces that a given=20 >Log implementation implements define the set of features which that=20 >logging implementation supports. > >Ceki G=FClc=FC wrote: >> >>Whether you choose Log to be an interface or an abstract class does >>not really matter. The point I am trying to convey is that jcl will >>not be able to abstract more than one logging API. Although desirable, >>abstraction is not technically feasible. > >-- >Ceki G=FClc=FC > > The complete log4j manual: http://qos.ch/log4j/ --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org