- 工信部备案号 滇ICP备05000110号-1
- 滇公安备案 滇53010302000111
- 增值电信业务经营许可证 B1.B2-20181647、滇B1.B2-20190004
- 云南互联网协会理事单位
- 安全联盟认证网站身份V标记
- 域名注册服务机构许可:滇D3-20230001
- 代理域名注册服务机构:新网数码
打开Tomcat目录conflogging.properties,修改如下,所有日志输出到tomcat开头的文件中
1catalina.org.apache.juli.FileHandler.level = FINE
1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
# 1catalina.org.apache.juli.FileHandler.prefix = catalina.
1catalina.org.apache.juli.FileHandler.prefix = tomcat.
2localhost.org.apache.juli.FileHandler.level = FINE
2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
# 2localhost.org.apache.juli.FileHandler.prefix = localhost.
2localhost.org.apache.juli.FileHandler.prefix = tomcat.
3manager.org.apache.juli.FileHandler.level = FINE
3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
# 3manager.org.apache.juli.FileHandler.prefix = manager.
3manager.org.apache.juli.FileHandler.prefix = tomcat.
4host-manager.org.apache.juli.FileHandler.level = FINE
4host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
# 4host-manager.org.apache.juli.FileHandler.prefix = host-manager.
4host-manager.org.apache.juli.FileHandler.prefix = tomcat.
修改Tomcat运行日志的等级
3.1 日志类型与级别
Tomcat 日志分?下面5类:
catalina 、 localhost 、 manager 、 admin 、 host-manager
每类日志的级别分为如下 7 种:
SEVERE (highest value) > WARNING > INFO > CONFIG > FINE > FINER > FINEST (lowest value)
3.2 日志级别的设定方法
修改 conf/logging.properties 中的内容,设定某类日志的级别
示例:
设置 catalina 日志的级别为: FINE
1catalina.org.apache.juli.FileHandler.level = FINE
禁用 catalina 日志的输出:
1catalina.org.apache.juli.FileHandler.level = OFF
输出 catalina 所有的日志消息均输出:
1catalina.org.apache.juli.FileHandler.level = ALL
售前咨询
售后咨询
备案咨询
二维码
TOP