Return-Path: Delivered-To: apmail-logging-log4j-user-archive@www.apache.org Received: (qmail 75859 invoked from network); 15 Jun 2007 13:39:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Jun 2007 13:39:17 -0000 Received: (qmail 88354 invoked by uid 500); 15 Jun 2007 13:39:17 -0000 Delivered-To: apmail-logging-log4j-user-archive@logging.apache.org Received: (qmail 88329 invoked by uid 500); 15 Jun 2007 13:39:17 -0000 Mailing-List: contact log4j-user-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Users List" Reply-To: "Log4J Users List" Delivered-To: mailing list log4j-user@logging.apache.org Received: (qmail 88313 invoked by uid 99); 15 Jun 2007 13:39:17 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Jun 2007 06:39:17 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [84.208.20.33] (HELO smtp.getmail.no) (84.208.20.33) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Jun 2007 06:39:13 -0700 Received: from pmxchannel-daemon.no-osl-m323-srv-009-z2.isp.get.no by no-osl-m323-srv-009-z2.isp.get.no (Sun Java System Messaging Server 6.2-7.05 (built Sep 5 2006)) id <0JJO00D09J8RJB00@no-osl-m323-srv-009-z2.isp.get.no> for log4j-user@logging.apache.org; Fri, 15 Jun 2007 15:38:51 +0200 (CEST) Received: from smtp.getmail.no ([10.5.16.1]) by no-osl-m323-srv-009-z2.isp.get.no (Sun Java System Messaging Server 6.2-7.05 (built Sep 5 2006)) with ESMTP id <0JJO009U7J8OEZ20@no-osl-m323-srv-009-z2.isp.get.no> for log4j-user@logging.apache.org; Fri, 15 Jun 2007 15:38:48 +0200 (CEST) Received: from diskbox.stolsvik.com ([84.208.115.107]) by no-osl-m323-srv-004-z1.isp.get.no (Sun Java System Messaging Server 6.2-7.05 (built Sep 5 2006)) with ESMTP id <0JJO00241J8ONG70@no-osl-m323-srv-004-z1.isp.get.no> for log4j-user@logging.apache.org; Fri, 15 Jun 2007 15:38:48 +0200 (CEST) Received: from [10.10.10.10] by diskbox.stolsvik.com with esmtp (Exim 4.63) (envelope-from ) id 1HzC0m-0006km-Df for log4j-user@logging.apache.org; Fri, 15 Jun 2007 15:38:48 +0200 Date: Fri, 15 Jun 2007 15:35:43 +0200 From: =?UTF-8?B?RW5kcmUgU3TDuGxzdmlr?= Subject: Re: isFatalEnabled()? In-reply-to: <05B7EF6222E3D54CAB73BEC19BF591CD980E40@mail.ingrian.com> To: Log4J Users List Message-id: <467295AF.3030300@Stolsvik.com> Organization: Picorg MIME-version: 1.0 Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 7BIT References: <05B7EF6222E3D54CAB73BEC19BF591CD980E40@mail.ingrian.com> User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) X-Virus-Checked: Checked by ClamAV on apache.org Bret Schuhmacher wrote: > There are methods for isDebugEnabled and isInfoEnabled, but how do you > check for isFatalEnabled or any of the other levels? I've used > isEnabledFor(Priority.), but Priority.FATAL and the rest are > deprecated, so what's the best way to test for the unrepresented > isEnabled levels? There is isTraceEnbled too. Just don't bother to test for them externally - they are always checked for inside log4j at any rate. It is assumed that there are rather few warnings, errors and fatals throughout an application, and that they mostly won't be turned off anyway, thus there isn't much need for the isEnabled methods. Those methods are only there to enable argument-construction bypass - that is, not having to actually make the log-message if logging for the particular level is turned off. Endre. --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-user-help@logging.apache.org