Logging in Apache Tomcat is implemented with the help of
Apache Commons Logging
library. That library is a thin wrapper above different logging
frameworks. It provides Tomcat with the ability to log
hierarchically across various log levels without the need to rely on a
particular logging implementation.
Since Tomcat 6.0, Tomcat uses a private package-renamed implementation of
Apache Commons Logging, to allow web applications to use their own
independent copies of the original Apache Commons Logging library.
In the default distribution this private copy of the library
is simplified and hardcoded to use the
To configure Tomcat to use alternative logging frameworks for its internal
logging, one has to replace the logging library with the one that is built
with the full implementation. Such library is provided as an extras
component. Instructions on how to configure Tomcat to use Log4j framework
for its internal logging may be found below.
A web application running on Apache Tomcat can:
Use system logging API,
HTTP/1.1 403 Forbidden