Chapter 6. Logging in Tomcat 7
Logging services play a vital role in the life of the administrator and developer to manage the application from the phase of development to production issues. It's the logging services that help you to find the actual problem in the web application. Also, it plays an essential role in performance tuning for many applications.
In this chapter, we will discuss:
Logging services in Tomcat 7
JULI
Log4j
Log level
Valve component
Analysis of logs
JULI
Previous versions of Tomcat (until 5.x) use Apache common logging services for generating logs. A major disadvantage with this logging mechanism is that it can handle only a single JVM configuration and it makes it difficult to configure separate logging for each class loader for independent applications. In order to resolve this issue, Tomcat developers have introduced a separate API for the Tomcat 6 version, that comes with the capability of capturing each class loader activity in the Tomcat logs. It is based on the java...