tomcat启动log和级别的设定 How do I enable theJULI logging in a Tomcat Server instance?

37 篇文章 0 订阅
8 篇文章 0 订阅

启用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?

http://wiki.eclipse.org/WTP_Tomcat_FAQ#How_do_I_enable_the_JULI_logging_in_a_Tomcat_5.5_Server_instance.3F

   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


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值