My mistake, The log4j.properties file got opened up in wordpad and then saved. I created a new one in a text file and it started to work perfectly. Windows crap!
Thanks for your time. Warren > -----Original Message----- > From: Jacob Kjome [mailto:[EMAIL PROTECTED] > Sent: Friday, November 30, 2007 11:04 AM > To: Log4J Users List > Subject: Re: JSF/Struts logs ok Servlet/JSP does not? > > > That's strange. BTW, the log4j.debug output you provided shows automatic > configuration. Given that you say you are manually configuring > Log4j, I would > expect to see that output as well. Did you just leave that out for some > reason, or aren't you seeing it? You shouldn't need to manually > configure > Log4j if you have log4j.jar in WEB-INF/lib and log4j.properties in > WEB-INF/classes. > > I'm not quite sure what to tell you, other than try a newer > version of Log4j > and maybe verify the output. > > Note that, normally, you'd obtain a logger by > Logger.getLogger("somename") > instead of directly abtaining the root logger. But, of course, > that beside > the point until the config loading works properly. > > > Jake > > On Thu, 29 Nov 2007 21:04:17 -0800 > "Warren" <[EMAIL PROTECTED]> wrote: > > I have a JSF app, a struts app and a Servlet/JSP app running in the same > > Tomcat 5.5 server. The JSF and Servlet app initialize and run > log4j with no > > problems. The Servlet/JSP app does not initialize log4j. I am > running Tomcat > > with -Dlog4j.debug set. > > > > The init method of the initial servlet loaded on startup, the > > log4j.properties file and the Tomcat stdout log are below: > > > > init method > > ... > > > > // props is the path to the log4j.properties file > > > > PropertyConfigurator.configure(props); > > Logger log = Logger.getRootLogger(); > > log.debug("Logger Works"); > > > > ###### > > > > log4j.properties file > > > > # Global logging configuration > > log4j.rootLogger=DEBUG, stdout > > log4j.appender.stdout=org.apache.log4j.ConsoleAppender > > log4j.appender.stdout.layout=org.apache.log4j.PatternLayout > > log4j.appender.stdout.layout.ConversionPattern=%5p [%t] - %m%n > > > > ###### > > > > stdout Tomcat log with -Dlog4j.debug set > > > > ... > > ----------> Parent Classloader: > > [EMAIL PROTECTED] > > . > > log4j: Using URL > > > [file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%20 5.5/webapp > s/ecr/WEB-INF/classes/log4j.properties] for automatic log4j configuration. > log4j: Reading configuration from URL > file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%205.5/webapps > /ecr/WEB-INF/classes/log4j.properties > log4j: Could not find root logger information. Is this OK? > log4j: Finished configuring. > log4j: Could not find root logger information. Is this OK? > log4j: Finished configuring. > log4j:WARN No appenders could be found for logger > (com.ecr.servlets.SetupServlet). > log4j:WARN Please initialize the log4j system properly. > > ####### > > My JSF and Struts apps have an identical copy of the log4j.properties file > as the Servlet/JSP app and it is located in the same place WEB-INF/classes. > And, all three apps are useing the same version of log4j version 1.2.8. > > The only thing I can think of is that I am not initializing my Servlet/JSF > log4j correctly the same way JSF and Struts are. What do I need to do to > make it work? > > Thanks, > > Warren > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
