conf/logging.properties 日志的配置文件
catalina.out tomcat的日志,持续增加
catalina.-年-月-日.log 切割日志
xxxxxaccess.log 访问日志
host-manager.2024-09-18.log 管理端日志
localhost.2024-09-18.log 管理端日志
manager.2024-09-18.log 管理端日志

catalina.out 主日志

catalina.out记录了tomcat的所有日志。

catalina.out在被切割后 内容不会被清空

访问日志

cat localhost_access_log.2023-12-09.txt

null

Tomcat 日志格式

日志内容 tomcat日志格式
客户端ip地址 %h
远程用户名 %l
远程用户名 %u
时间和日期 %t
http请求报文的起始行(请求方法和url) %r
status http状态码 %s
文件/页面/资源大小(字节) %b
tomcat处理请求耗时(ms) %D
记录用户从哪里跳转过来的 %{Referer0}i
客户端游览器 %{User-Agent}i

修改访问日志的格式:

[root@iZ2zegf84anoz74xvdnv8cZ tomcat]# vim conf/server.xml
pattern="%h %l %u %t "%r" %s %b %D "%{Referer}i" "%{UserAgent}i"" />

null

results matching ""

    No results matching ""