Return-Path: Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 8583 invoked by uid 98); 11 Dec 2002 21:42:59 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Received: (qmail 8561 invoked from network); 11 Dec 2002 21:42:57 -0000 Received: from daedalus.apache.org (HELO apache.org) (63.251.56.142) by nagoya.betaversion.org with SMTP; 11 Dec 2002 21:42:57 -0000 Received: (qmail 13724 invoked by uid 500); 11 Dec 2002 21:41:43 -0000 Received: (qmail 13717 invoked from network); 11 Dec 2002 21:41:43 -0000 Received: from 66-207-66-79.black.dmt.ntelos.net (HELO palaka.bullwip.com) (66.207.66.79) by daedalus.apache.org with SMTP; 11 Dec 2002 21:41:43 -0000 Received: from gen2tek007 (gen2tek-007.bullwip.com [192.168.0.7]) by palaka.bullwip.com (8.12.2/8.12.2) with SMTP id gBBLcTAb022069 for ; Wed, 11 Dec 2002 16:38:29 -0500 (EST) Reply-To: From: "Jerome Jacobsen" To: "Jakarta Commons Users List" Subject: RE: Totaly frustrated with commons-logging Date: Wed, 11 Dec 2002 16:39:26 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal In-Reply-To: <1039641644.3515.7.camel@xlap.intland.com> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Sounds like a Log4J issue, not a Commons Logging issue. To be sure you can replace your use of Commons Log class with Log4J Logger class. Anyway, what you are doing looks OK. You could also try putting the file under the tomcat classes directory or tomcat/server/classes. > -----Original Message----- > From: Zsolt Koppany [mailto:zkoppany@web.de] > Sent: Wednesday, December 11, 2002 4:21 PM > To: Jakarta Commons Users List > Subject: RE: Totaly frustrated with commons-logging > > > After setting log4j.debug=true in the command line I see a strange error > message that "log4j: Could not find resource: [log4j.properties]." > Before you think that the file does not exists I show what ls tells me: > > ls -l WEB-INF/classes/log4j.properties > -rw-r--r-- 1 zk 1240 Dec 11 22:16 > WEB-INF/classes/log4j.properties > > How is that possible? I use jdk-1.4.1 with tomcat-4.1.12-LE-jdk14 > > > Messages: > > log4j: Trying to find [log4j.properties] using > sun.misc.Launcher$AppClassLoader@4b222f class loader. > log4j: Trying to find [log4j.properties] using > ClassLoader.getSystemResource(). > log4j: Could not find resource: [log4j.properties]. > > > On Wed, 2002-12-11 at 15:19, Jonathan Mangano wrote: > > I have been using commons-logging, log4j, Tomcat and Struts for > a while now. When configured it only gives the log messages I > want and does not fill my screen or log files with too much > information. Without more information, my guess is that the > problem lies with your setup of log4j, not commons-logging. > > > > Maybe a description of my own setup might help. I have two > configuration files in my class directory: > > > > 1. commons-logging.properties > > Which contains a single line: > > > org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log > 4JCategoryLog > > > > 2. log4j.properties > > Which contains the follwing: > > # log4j configuration file > > > > log4j.debug=true > > > > # Create two appenders, one called stdout and the other called rolling > > log4j.logger.com.mypackage=INFO, stdout, rolling > > log4j.logger.org.apache=WARN, stdout, rolling > > > > # Configure the stout appender to go to the Console > > log4j.appender.stdout=org.apache.log4j.ConsoleAppender > > > > # Configure the stdout appender to use the PatternLayout > > log4j.appender.stdout.layout=org.apache.log4j.PatternLayout > > > > # Pattern to output the caller's file name and line number. > > log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n > > > > # Configure the rolling appender to be a RollingFileAppender > > log4j.appender.rolling=org.apache.log4j.DailyRollingFileAppender > > > > # Configure the name of the file for the rolling appender > > log4j.appender.rolling.File=console.log > > > > #Configure the layout pattern and conversion pattern for the > rolling appender > > log4j.appender.rolling.layout=org.apache.log4j.PatternLayout > > log4j.appender.rolling.layout.ConversionPattern=%d{ABSOLUTE} - > %p %c [%t] - %m%n > > > > I use the standard call to get a logger in my code: > > Log logger = LogFactory.getLog(MyClass.class.getName()); > > logger.warn("This is a warning"); > > > > If you are using Struts, you might also want to check that you > have the correct jar files. See http://jakarta.apache.org/builds/jakarta-struts/release/v1.1-b2/ and follow the instructions for log4j users. > > -----Original Message----- > From: Zsolt Koppany [mailto:z.koppany@intland.com] > Sent: December 11, 2002 5:20 AM > To: Jakarta Commons Users List > Subject: Totaly frustrated with commons-logging > > > Hi, > > I'm totally frustrated with commons-logging. My applications uses log4j > and now tomcat switches log4j on because of commons-logging. Because I > do have to debug, I get a lot of absolutely unusable logs. The first log > of my application comes after 18000 lines of logging information. > Somebody might find that very cool I just find it terrible. I have read > the manual of commons-logging. I read about enterprise logging (find it > cool) but could not figure out how for example I could use the jdk-1.4 > logging. > I really hate that commons-logging changes log4j that I get this huge > amount of unusable debug information. > How can I disable that? > > Unfortunately it is not more possible to configure log4j that I just > want to see the logs of package xy. I mean a log4j configuration option: > > log4j.rootCategory=DEBUG, A1, A2 > log4j.logger.org.apache.commons=WARN > log4j.logger.org.apache.struts=WARN > log4j.logger.xy=DEBUG -- Zsolt -- To unsubscribe, e-mail: For additional commands, e-mail: