tomcat access log 参数
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了tomcat access log 参数相关的知识,希望对你有一定的参考价值。
- %a - Remote IP address
- %A - Local IP address
- %b - Bytes sent, excluding HTTP headers, or ‘-‘ if no bytes were sent
- %B - Bytes sent, excluding HTTP headers
- %h - Remote host name (or IP address if enableLookups for the connector is false)
- %H - Request protocol
- %l - Remote logical username from identd (always returns ‘-‘)
- %m - Request method
- %p - Local port
- %q - Query string (prepended with a ‘?‘ if it exists, otherwise an empty string
- %r - First line of the request
- %s - HTTP status code of the response
- %S - User session ID
- %t - Date and time, in Common Log Format format
- %u - Remote user that was authenticated
- %U - Requested URL path
- %v - Local server name
- %D - Time taken to process the request, in millis
- %T - Time taken to process the request, in seconds
- %I - current Request thread name (can compare later with stacktraces)
两个特殊的
- common -
%h %l %u %t "%r" %s %b
- combined -
%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"
高级的
%{xxx}i
for incoming headers%{xxx}o
for outgoing response headers%{xxx}c
for a specific cookie%{xxx}r
xxx is an attribute in the ServletRequest%{xxx}s
xxx is an attribute in the HttpSession%{xxx}t
xxx is an enhanced SimpleDateFormat pattern (see Configuration Reference document for details on supported time patterns)
以上是关于tomcat access log 参数的主要内容,如果未能解决你的问题,请参考以下文章
01. localhost_access_log 记录post请求参数
在 tomcat 上使用 Log4j2 的 Access.log 作为 JSON