Return-Path: Delivered-To: apmail-logging-log4j-user-archive@www.apache.org Received: (qmail 40301 invoked from network); 18 Dec 2007 08:19:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Dec 2007 08:19:47 -0000 Received: (qmail 10094 invoked by uid 500); 18 Dec 2007 08:19:31 -0000 Delivered-To: apmail-logging-log4j-user-archive@logging.apache.org Received: (qmail 9820 invoked by uid 500); 18 Dec 2007 08:19:30 -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 9809 invoked by uid 99); 18 Dec 2007 08:19:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Dec 2007 00:19:30 -0800 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [207.46.51.80] (HELO outbound6-sin-R.bigfish.com) (207.46.51.80) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Dec 2007 08:19:07 +0000 Received: from outbound6-sin.bigfish.com (localhost.localdomain [127.0.0.1]) by outbound6-sin-R.bigfish.com (Postfix) with ESMTP id 5D4DFA3ABCF for ; Tue, 18 Dec 2007 08:17:38 +0000 (UTC) Received: from mail9-sin-R.bigfish.com (unknown [10.3.40.3]) by outbound6-sin.bigfish.com (Postfix) with ESMTP id 4EB79C78053 for ; Tue, 18 Dec 2007 08:17:38 +0000 (UTC) Received: from mail9-sin (localhost.localdomain [127.0.0.1]) by mail9-sin-R.bigfish.com (Postfix) with ESMTP id 039F53902E3 for ; Tue, 18 Dec 2007 08:17:13 +0000 (UTC) X-BigFish: V X-MS-Exchange-Organization-Antispam-Report: OrigIP: 193.67.51.174;Service: EHS Received: by mail9-sin (MessageSwitch) id 1197965832677075_2662; Tue, 18 Dec 2007 08:17:12 +0000 (UCT) Received: from mail03.numico.net (unknown [193.67.51.174]) by mail9-sin.bigfish.com (Postfix) with ESMTP id F064A19A8064 for ; Tue, 18 Dec 2007 08:17:10 +0000 (UTC) Received: from nldatams01.intra.numico.net ([172.18.110.28]) by mail03.numico.net with Microsoft SMTPSVC(6.0.3790.1830); Tue, 18 Dec 2007 09:19:16 +0100 Received: from nlwtc1ms03.intra.numico.net ([172.18.234.56]) by nldatams01.intra.numico.net with Microsoft SMTPSVC(6.0.3790.3959); Tue, 18 Dec 2007 09:19:01 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: logger w/o any appender Date: Tue, 18 Dec 2007 09:19:00 +0100 Message-ID: <5D07C30A6AED9D41B15EFF1EB1D04DCB049770A7@nlwtc1ms03.intra.numico.net> In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: logger w/o any appender Thread-Index: Acg+cPkrycjpWsUEQiOiDJ8/lgR9PQCbst7QABr9WqA= From: "Blok, Eelke" To: "Log4J Users List" X-OriginalArrivalTime: 18 Dec 2007 08:19:01.0945 (UTC) FILETIME=[A5787A90:01C8414E] X-Virus-Checked: Checked by ClamAV on apache.org I would say that if the situation that a warning is pointing out is as expected, you can ignore it (after all, it's a warning, not an error). However, commonly, you configure loggers to log something, and if there are no appenders to catch the log messages produced by the logger, 9 times out of 10 that would not be what you want and may indicate a mistake in your configuration. Hence, a warning is produced.=20 Apparently, the warning mechanism doesn't check if the logger has been turned off. (With that said, logger log level configuration tends to be more dynamic, being changed all the time to change which parts of the logger tree are examined, while appender configuration is more static; typically you would not shift around or remove appenders just because they would not receive any log message for the current logger configuration. The logger configuration may be different tomorrow, or in five minutes, at which time a missing appender may well be a problem, so not checking whether the logger happens to be turned off can actually be useful, in some situations). -----Original Message----- From: Mak, Howard [mailto:hmak@vaultus.com]=20 Sent: maandag 17 december 2007 20:06 To: 'log4j-user@logging.apache.org' Subject: logger w/o any appender If my log4j.properties has log4j.logger.MYLOG =3D OFF log4j.additivity.MYLOG =3D false Log4j prints log4j:WARN No appenders could be found for logger (MYLOG.SUBLOG). log4j:WARN Please initialize the log4j system properly. Is an appender always required even if log level is OFF? Thanks for any help. - Howard --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-user-help@logging.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-user-help@logging.apache.org