Add the following rows:
<Valve classname = "org. apache. catalina. valves. accesslogvalve "directory =" logs "prefix =" bbs_access_log. "suffix = ". log "pattern =" % A-% H-% B-% H-% m-% Q-% R-% s-% T-% u-% v "resolvehosts =" false "/>
Syntax description: Directory = "logs" ---- directory for storing logs. do not modify the directory.
Prefix = "bbs_access_log." ---- Log File Name
Suffix = ". log" --- Log File Extension
Pattern = "% A..." --- log field parameters
Resolvehosts = "false" --- parameter description:
% A-remote IP address (remote IP address)
% A-local IP address (local IP address)
% B-Bytes Sent, excluding HTTP headers, or '-' If zero (byte outflow, excluding HTTP headers. If it is zero byte, separate it)
% B-Bytes Sent, excluding HTTP headers (Bytes outflow, excluding HTTP headers)
% H-remote host name (or IP address if resolvehosts is false) (remote host name)
% H-request protocol (Remote Request Host port)
% L-remote logical username from identd (always returns '-') (Remote User Name Recognition)
% M-Request Method (get, post, etc.) (Request Method)
% P-local port on which this request was received ed
% Q-query string (prepended with ′? 'If it exists) query string (If yes, use '? 'Start)
% R-first line of the request (method and request URI) (submitted in the first line)
% S-HTTP status code of the response (return HTTP status code)
% S-user session ID (get user session ID)
% T-date and time, in common log format (record submission time)
% U-remote user that was authenticated (if any), else '-' (identify the remote user location)
% U-requested URL path (requested URL path)
% V-local server name (local server name)