Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 82415 invoked from network); 26 Mar 2009 06:50:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Mar 2009 06:50:06 -0000 Received: (qmail 77640 invoked by uid 500); 26 Mar 2009 06:50:04 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 77511 invoked by uid 500); 26 Mar 2009 06:50:04 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 77501 invoked by uid 99); 26 Mar 2009 06:50:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Mar 2009 06:50:04 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mario@ops.co.at designates 195.242.168.21 as permitted sender) Received: from [195.242.168.21] (HELO exchange.ops.co.at) (195.242.168.21) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Mar 2009 06:49:57 +0000 Received: from ex1.opshq.ops.at ([172.27.1.21]) by ex1 ([172.27.1.21]) with mapi; Thu, 26 Mar 2009 07:49:32 +0100 From: Mario Ivankovits To: 'Commons Developers List' Date: Thu, 26 Mar 2009 07:49:31 +0100 Subject: RE: [VFS] "anonymous" debug logging Thread-Topic: [VFS] "anonymous" debug logging Thread-Index: AcmtxqOpWOE7Av3VTDC34Br6BuHIqwAFxtZA Message-ID: References: <94C476C03BFF5E42AC3518FDAC9643C4D044BD55A9@HQMAIL.rocketsoftware.com> <4F273B32-3CC8-405B-BEDB-AB004AFB2894@dslextreme.com> In-Reply-To: <4F273B32-3CC8-405B-BEDB-AB004AFB2894@dslextreme.com> Accept-Language: de-DE Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Hi! > From: Ralph Goers [mailto:ralph.goers@dslextreme.com] >=20 > I'm not a big fan of that. Me too, any decent logging facility should allow to configure the logger on= a "per package" level, so no problem to make the logging silent for a give= n package. > I'd prefer to switch to SLF4J and just replace Everyone in commons land is using commons-logging, no? There is no good reason to leave this path. Sure, for my work-projects I us= e slf4j too, lately I even use the Java Logging API (which is worse), but a= lways by using a the commons-logging API (not the Impl, just the API) Everyone wanting to use slf4j can easily do that by using the slf4j-commons= -logging adapter and removing the commons-logging jar. Not a big deal. There is no benefit in switching to slf4j at all for commons-vfs, or? >=20 > if (log.isDebugEnabled()) > { > log.debug("putFile: " + file.getName()); > } >=20 > with >=20 > logger.entry(file.getName()); This is not the same, in the second example getName() gets evaluated every = time, regardless of the configured log-level. Depending on how complicated = it is to collect the message, this might become a performance problem. the = if (log.isXXXEnabled()) prevents that. I'd prefer to keep it the way it is.=20 Ciao, Mario --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org