Getting Tomcat 5.0.28 to use Log4j can be a bit of a feat. Tomcat uses commons-logging. I can't remember all the details, but I think getting Tomcat's commons-logging to use Log4j as its logging implementation requires changing out the commons-logging-api.jar that is loaded in the bootstrap process to use commons-logging.jar which actually includes the Log4j adapter. I imagine, then, you'd also have to put Log4j in the bootstrap classpath along with commons-logging. 5.5 is much more friendly about this. You just drop commons-logging.jar and log4j.jar into common/lib and log4j.xml into common/classes and it just works. If you continue to have problems, I would search the Tomcat-user list for details on getting Tomcat-5.0.xx to use Log4j. I haven't used 5.0.xx for ages so I my help is only as good as my memory.
Jake Quoting Cosmin Bucur <[EMAIL PROTECTED]>: > Hi , > > This is a problem i've been encountering every now and then and i was > able to fix at times by redeploying my app and restarting tomcat ... > if that makes any sense . > > Anywais , I just moved to a new linux server , still on tomcat 5.0.28 > , and for a day and a half I have not been able to get log4j to tell > me why the app can't be deployed . > > Normally I'd get a list of exceptions , messages , stack traces . All > I get now is : > > Jun 28, 2005 11:27:52 AM org.apache.catalina.core.StandardContext > listenerStart > SEVERE: Skipped installing application listeners due to previous error(s) > Jun 28, 2005 11:27:52 AM org.apache.catalina.core.StandardContext start > SEVERE: Error listenerStart > Jun 28, 2005 11:27:52 AM org.apache.catalina.core.StandardContext start > SEVERE: Context startup failed due to previous errors > > I tried both with the log4j.properties file in myapp/WEB-INF/classes : > > > log4j.appender.stdout=org.apache.log4j.ConsoleAppender > log4j.appender.stdout.Target=System.out > log4j.appender.stdout.layout=org.apache.log4j.PatternLayout > log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - > %m%n > > log4j.rootLogger=debug, stdout > > and the log4j.properties file in TOMCAT_HOME/common/classes : > > log4j.rootLogger=ERROR, A1 > log4j.appender.A1=org.apache.log4j.ConsoleAppender > log4j.appender.A1.layout=org.apache.log4j.PatternLayout > > log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n > > log4j.logger.org.apache=DEBUG > > ------------------ > > I added the log4j jar in my app , in common/lib , server/lib , > shared/lib . I tried only with the global log4j.properties or only > with my application's log4j.properties . > > NOTHING works . > > Any help will be greately apreciated . > > thanks > > --------------------------------------------------------------------- > 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]