Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 7785 invoked from network); 28 Sep 2005 06:35:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Sep 2005 06:35:19 -0000 Received: (qmail 16357 invoked by uid 500); 28 Sep 2005 06:35:10 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 16227 invoked by uid 500); 28 Sep 2005 06:35:09 -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 16193 invoked by uid 99); 28 Sep 2005 06:35:09 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Sep 2005 23:35:09 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [134.98.65.18] (HELO gateway.elsag.de) (134.98.65.18) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 27 Sep 2005 23:35:12 -0700 Received: from vwall.elsag.de by gateway.elsag.de via smtpd (for asf.osuosl.org [140.211.166.49]) with ESMTP; Wed, 28 Sep 2005 08:34:42 +0200 Received: from esmail by esmail via smtpd (for vwall.elsag.de [192.168.100.108]) with ESMTP; Wed, 28 Sep 2005 08:34:41 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable content-class: urn:content-classes:message X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 Subject: RE: [logging] Logger.getName Date: Wed, 28 Sep 2005 08:34:41 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [logging] Logger.getName Thread-Index: AcXDtHQeuEb9My64QxCe0Y34ToPqrgAQUkFw From: =?iso-8859-1?Q?J=F6rg_Schaible?= To: "Jakarta Commons Developers List" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Joerg Hohwiller wrote on Wednesday, September 28, 2005 12:40 AM: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 >=20 > Hi everybody, >=20 > since nothing happened after I opened bugzilla issue 15939 > and called for discussion, I simply started changing all > implementations of Log so they implement Logger instead (all > locally). I will supply the patch, when I am done. >=20 > Now what I found out when worked on LogKitLogger, is that > they deperected the "getCategory()" method which is the > analogy of the invented "getName()" method. Their deprecation > is: Deprecated. This method violates Inversion of > Control principle. If you are relying on its presence then > there may be something wrong with the design of your system > = http://www.keelframework.org/release/2.1-dev/javadoc/org/apache/log/Logge= r.html#getCategory() > > Actually it seems they have now even completely removed the method: > = https://svn.apache.org/repos/asf/excalibur/trunk/containerkit/logkit/src/= java/org/apache/log/Logger.java > > I can not see the point (esp. when there are methods as > "public synchronized Logger[] getChildren()")? > > Can someone give me a hint? > > I do not really need the "getName()" method and could also leave it = out > of Logger. But for me it would still make sense to have the method and > it would be possible to implement it. Well, since getCategory is already gone, you cannot implement getName = anymore in a compatible matter. What will work as alternative is:=20 Logger getChild(String name) This is basically, what Niclas proposed as use case for getName(): Logger loggfer =3D Logger.getLogger(parentLogger.getName + ".child"); getChild can be implemented for all logger packages that either support = getName or have getChild ... and this seems all of them. WDYT? - J=F6rg --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org