Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 18179 invoked from network); 3 Apr 2009 14:17:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Apr 2009 14:17:59 -0000 Received: (qmail 38648 invoked by uid 500); 3 Apr 2009 14:17:52 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 38582 invoked by uid 500); 3 Apr 2009 14:17:52 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 38520 invoked by uid 99); 3 Apr 2009 14:17:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Apr 2009 14:17:52 +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 daniel.armbrust.list@gmail.com designates 209.85.221.134 as permitted sender) Received: from [209.85.221.134] (HELO mail-qy0-f134.google.com) (209.85.221.134) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Apr 2009 14:17:45 +0000 Received: by qyk40 with SMTP id 40so1663574qyk.30 for ; Fri, 03 Apr 2009 07:17:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=RpGSeobpBjno11U5NowEoK0ck6Ebm5yNXdUoLvGks4k=; b=bS+/U02lWIGFccBy5sPoKwFWLnQ23hNeFAfe0kxkOY5G8xI3T8jlQ7vc6o2WbFdYZd RA2NuO6qI7IBSrLwYuP+XvnAgKnR0ZwA0AR4IDlPa3FFpLFq+0gcTZ6HdDG/xr2o7TCw IsVbCz4WLwt18bGu3DMvGXXANWM+tWWFEKkcs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=qQsehOEnCHqpTDpUa85wb9aLQk8sx3LhAhoBfL5dUqMG9wxh+Rg73lACaIOqhUucfw GuP8Q00a89lney5+/kKdm9yh7lhoboUDOOyAlOnarSWlK0ysTAuvQnxKCQ2YAFoRB6W9 oUaqjimiUuGtyD10CeIdRE5dkWlOQSMroDpxk= MIME-Version: 1.0 Received: by 10.220.95.14 with SMTP id b14mr1719557vcn.35.1238768244206; Fri, 03 Apr 2009 07:17:24 -0700 (PDT) In-Reply-To: <0AAE5AB84B013E45A7B61CB66943C17215E6F33149@USEA-EXCH7.na.uis.unisys.com> References: <82f04dc40904021618u23510f14occbee37a1f65fa00@mail.gmail.com> <0AAE5AB84B013E45A7B61CB66943C17215E6F33149@USEA-EXCH7.na.uis.unisys.com> Date: Fri, 3 Apr 2009 09:17:24 -0500 Message-ID: <82f04dc40904030717m782b10a8j2569da7416b64ded@mail.gmail.com> Subject: Re: And even further into the black magic of logging configuration within tomcat... From: Dan Armbrust To: Tomcat Users List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Apr 2, 2009 at 9:55 PM, Caldarale, Charles R wrote: >> From: Dan Armbrust [mailto:daniel.armbrust.list@gmail.com] >> Subject: And even further into the black magic of logging configuration >> within tomcat... >> >> So, why didn't log4j try to find the log4j.properties >> file for the second webapp? > > Verify that you have separate log4j.properties files in the WEB-INF/class= es directories of each webapp, and that there's not a permissions problem w= ith them being accessed by whatever userid Tomcat is running under. Yep. It exists. > > Where is your log4j.jar located? =A0You should have separate ones in each= webapp's WEB-INF/lib directory; Yes again. I think that _this_ bug explains why so many people have issues getting log4j configured in tomcat. If you deploy more than one webapp, log4j doesn't attempt to self-configure in the second or any subsequent webapps. I'm going to go hunt in some log4j code, and try to understand how log4j goes about deciding if it should search for a log4j.properties file. But I suspect that the problem is in Tomcat - Something is probably being stored in a class loader that is visible to all webapps, when it should not be. So Log4j thinks that it is already configured in webapp 2 - but it's not, because all of the appenders, etc, are in the classloader specific to webapp 1. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org