1. conf/server.xml
注释掉<Value/>节,不生成localhost_access_log。
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt"
pattern="%h %l %u %t "%r" %s %b %D" />
修改pattern属性,记录想要的信息:
%a - Remote IP address 远程机器地址
%A - Local IP address 服务器本机地址
%b - Bytes sent, excluding HTTP headers, or '-' if zero 发送的字节数,不包含HTTP头信息
%B - Bytes sent, excluding HTTP headers
%h - Remote host name (or IP address if enableLookups for the connector is false) 远程主机名,或者IP地址如果<span style