Tomcat configuration file

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.