You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Antti Ollilainen <an...@gmail.com> on 2006/03/14 08:07:12 UTC

Internal logging in Tomcat 5.5?

Hello,

I have problems configuring the Tomcat 5.5's internal logging. I need to see
stack traces of uncaught exceptions. I know, this question has been
discussed and answered numerous times on this list but even after reading
the logging documentation (
http://tomcat.apache.org/tomcat-5.5-doc/logging.html) and discussions here I
can't solve this problem.

My setup is the following: Tomcat's CATALINA_HOME is in /opt/tomcat and the
webapps are located elsewhere by setting CATALINA_BASE for each. The webapps
use log4j for their own logging and it is configured individually for each
webapp. The webapp logging works fine but I dont get the Tomcat's exceptions
in webapp's log file or catalina.out.

I have copied log4j and commons logging jars to Tomcat's common/lib and
copypasted the log4j.properties from the logging documentation to
common/classes. The result was that after restarting the apps their logging
went to this common log file in addition to their own log files. However,
the Tomcat log information was not there.

So, how do I get the old style localhost log information about errors?

Re: Internal logging in Tomcat 5.5?

Posted by Boris Unckel <bo...@gmx.net>.
Hello,

> Von: "Antti Ollilainen" <an...@gmail.com>
> I have copied log4j and commons logging jars to Tomcat's common/lib and
> copypasted the log4j.properties from the logging documentation to
> common/classes. The result was that after restarting the apps their
> logging
> went to this common log file in addition to their own log files. However,
> the Tomcat log information was not there.
> 
> So, how do I get the old style localhost log information about errors?
the commons/lib commons/classes are the problem.
It is _good_ to have all jars for the application in WEB-INF/lib and the
configuration in WEB-INF/classes .
Remove the jars from commons/lib and the config from commons/classes and
configure the server with $CATALINA_HOME/server/lib and
$CATALINA_HOME/server/classes .
Use commons-logging-adapters.jar for your webapplication. Place a
commons-logging.properties in each WEB-INF/classes with a
org.apache.commons.logging.Log property in it. Defining this property in a
commons-logging.properties file is the recommended way of explicitly
selecting a Log implementation.

Read also
http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html
http://jakarta.apache.org/commons/logging/guide.html
http://jakarta.apache.org/commons/logging/troubleshooting.html

Feedback if it works would be nice.

Regards
Boris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org