|
From: James C. <jim...@do...> - 2004-03-03 19:17:27
|
No one having any log4J problems? Any ideas on what I may be doing wrong? > -----Original Message----- > From: James Cook [mailto:jim...@do...] > Sent: Tuesday, March 02, 2004 2:41 PM > To: 'spr...@li...' > Subject: Log4J configuration > > I'm trying to get my web-tier to log to a file, and my configuration is > based on the JPetstore example. My web.xml file contains the following > entries: > > <context-param> > <param-name>log4jConfigLocation</param-name> > <param-value>/WEB-INF/classes/log4j.properties</param-value> > </context-param> > > <listener> > <listener- > class>org.springframework.web.util.Log4jConfigListener</listener-class> > </listener> > > I am deploying to Tomcat 5.0.18, and I have added -Dlog4j.debug=true to > the Tomcat startup. > > In the Tomcat5 console, I begin to see JDK 1.4 style logging statements > describing the Tomcat, Hibernate and Spring startup. About half-way > through, the listener is loaded and I see Spring's loading of my > log4j.properties file from the proper directory. Because I turned log4j > debug on, I see the successful parsing of the log4j properties file. Now I > would expect any future logging to be directed to my log4j appenders (both > console and file), however the JDK-style logging continues. In the end, > the log4j debug file was created, but has 0 bytes. > > I am not deploying a war file to Tomcat (either packed or unpacked.) I am > simply pointing Tomcat at my directory structure. > > Any ideas? |