* %a - 远端IP地址
* %A - 本地IP地址
* %b - 发送的字节数,不包括HTTP头,如果为0,使用"-"
* %B - 发送的字节数,不包括HTTP头
* %h - 远端主机名(如果resolveHost=false,远端的IP地址)
* %H - 请求协议
* %l - 从identd返回的远端逻辑用户名(总是返回 '-')
* %m - 请求的方法(GET,POST,等)
* %p - 收到请求的本地端口号
* %q - 查询字符串(如果存在,以 '?'开始)
* %r - 请求的第一行,包含了请求的方法和URI
* %s - 响应的状态码
* %S - 用户的session ID
* %t - 日志和时间,使用通常的Log格式
* %u - 认证以后的远端用户(如果存在的话,否则为'-')
* %U - 请求的URI路径
* %v - 本地服务器的名称
* %D - 处理请求的时间,以毫秒为单位
* %T - 处理请求的时间,以秒为单位
- %a - Remote IP address
- %A - Local IP address
- %b - Bytes sent, excluding HTTP headers, or '-' if zero
- %B - Bytes sent, excluding HTTP headers
- %h - Remote host name (or IP address if
resolveHosts
is false)
- %H - Request protocol
- %l - Remote logical username from identd (always returns '-')
- %m - Request method (GET, POST, etc.)
- %p - Local port on which this request was received
- %q - Query string (prepended with a '?' if it exists)
- %r - First line of the request (method and request URI)
- %s - HTTP status code of the response
- %S - User session ID
- %t - Date and time, in Common Log Format
- %u - Remote user that was authenticated (if any), else '-'
- %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)
%{xxx}i
for incoming request headers
%{xxx}o
for outgoing response headers
%{xxx}c
for a specific request cookie
%{xxx}r
xxx is an attribute in the ServletRequest
%{xxx}s
xxx is an attribute in the HttpSession