Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 36487 invoked from network); 9 Apr 2003 12:55:58 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 9 Apr 2003 12:55:58 -0000 Received: (qmail 22756 invoked by uid 97); 9 Apr 2003 12:57:50 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@nagoya.betaversion.org Received: (qmail 22749 invoked from network); 9 Apr 2003 12:57:50 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 9 Apr 2003 12:57:50 -0000 Received: (qmail 35029 invoked by uid 500); 9 Apr 2003 12:55:37 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 35015 invoked from network); 9 Apr 2003 12:55:35 -0000 Received: from unknown (HELO dev3.etilizepak.com) (202.141.243.5) by daedalus.apache.org with SMTP; 9 Apr 2003 12:55:35 -0000 Message-ID: <006f01c2fe97$d82d27f0$b10aa8c0@aqureshi1> From: "Affan Qureshi" To: "Tomcat Users List" References: <1A847600F409D711B52C0001FAFFF337925398@vnetxu01.london.virgin.net> Subject: Logging control in Tomcat Date: Wed, 9 Apr 2003 17:59:23 +0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi, Same old question about logging.... I searched through the archive and found many useful pointers but none to answer this. I have Tomcat 4.1.18 (and Struts1.1b2) on Win2000 using JDK1.4. I want to use log4J under commons-logging. I have commons-logging.jar and log4j.jar in my WEB-INF/lib and commons-logging.properties and log4j.properties in WEB-INF/classes. The problem is that all the default messages of Tomcat/Struts start to appear in my log file instead of catalina.out or the console. I read that I shouldn't place log4j.jar in my WEB-INF/lib but without that commons-logging does not initialize log4j correctly and picks up Jdk14Logger instead (although the o.a.c.l.LogFactory.getFactory().getAttribute("org.apache.commons.logging.Log ") shows correct class but it is not found). I have also tried to put log4j.jar in tomcat's server/lib but no improvement. Has anyone implemented under the same parameters? 2nd question, I want to programmatically configure the location of my log file (via the app. admin interface on startup). But I think it is difficult to do so when hiding the implementation behind common-logging. Also I want the log-level and some other attribute configurable via the admin interface. Any suggestions? 3rd question, how do I change the default log level (or for my app context) in Tomcat? I tried setting it in struts-config.xml but did not make a difference. Something in conf/server.xml i think? Thanks a lot. Affan --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org