启用tomcat默认自带的 log和级别的设定
在启动tomcat时,加上启动参数
-Djava.util.logging.config.file="<put catalina.base pathhere>/conf/logging.properties"
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
并且在<put catalina.base pathhere>/conf/logging.properties里加上下行以调整log的级别:org.apache.catalina.level=FINEST
How do I enable theJULI logging in a Tomcat 5.5 Server instance?
1. Open the server editor for the Tomcatserver and note the folder specified by the Configuration path field.
2. Import the logging.properties file fromthe conf directory of your Tomcat installation into this folder in yourworkspace.
3. In the server editor, click on the Openlaunch configuration link and in the launch configuration Properties dialog,switch to the Arguments tab.
4. In the VM Arguments field, add thefollowing two system properties substituting the catalina.base path wherenoted:
-Djava.util.logging.config.file="<put catalina.base pathhere>/conf/logging.properties"
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file="C:/ProgramFiles/Java/jdk1.5.0_10/jre/lib/logging.properties"
-Djava.util.logging.config.file="C:/ProgramFiles/Apache/apache-tomcat-6.0.35/conf/logging.properties"
add this to the end of the logging.properties above
############################################################
# Added
# refer tohttp://www.student.lu.se/docs/logging.html
############################################################
#The defaultlogging.properties specifies a ConsoleHandler for routing logging to stdout andalso a FileHandler. A handler's log level threshold can be set using SEVERE,WARNING, INFO, CONFIG, FINE, FINER, FINEST or ALL. The logging.propertiesshipped with JDK is set to INFO. You can also target specific packages tocollect logging from and specify a level. Here is how you would set debuggingfrom Tomcat. You would need to ensure the ConsoleHandler's level is also set tocollect this threshold, so FINEST or ALL should be set. Please refer to Sun'sjava.util.logging documentation for the complete details.
org.apache.catalina.level=FINEST