Changing log verbosity in Tomcat 4.1, 5.0 and 5.5
Tomcat 4.1
=========
In Tomcat 4.1, the logVerbosityLevel attribute for the Logger element can be used to set the log level. FATAL, ERROR, WARNING, INFORMATION, and DEBUG are the valid values. The default setting is at the WARNING level.
Tomcat 5.0
=========
In Tomcat 5.0, it can be changed through commons logging or log4j. Log4j is recommended as it has greater flexibility. In doing so:
1) Download commons-logging.jar
2) Download the log4j package
3) Copy both commons-logging.jar and log4j.jar to tomcat5.0/common/lib directory
4) Put log4j.properties file in tomcat5.0/common/classes
5) Add "lof4j.rootLogger=ERROR, ROOT" to the log4j.properties file which sets the global loglevel. NOTE: Skip this step if you only want to set the log level on the packages or classes level.
6) You can optionally set the loglevel for individual packages or classes. In this case, use "log4j.org.apache.jasper.servlet.JspServlet=ERROR". ERROR, INFO, DEBUG are valid log levels for log4j.
Tomcat 5.5
=========
In Tomcat 5.5, the log level will be done through the individual Tomcat instance's logging.properties files. For complete documentation on how it works in Tomcat 5.5, see the official documentation provided by the Apache Software Foundation: http://tomcat.apache.org/tomcat-5.5-doc/logging.html
Popular Links
Comments
Post new comment