HP Cache Server Appliance Administrator Guide
170
Appendix D Configuration Files
Refer to records.config‚ on page 182 for information about setting records.config variables. If the
proxy.config.log2.custom_logs_enabled variable is set to 0 (disabled), any custom log files set in the
logs.config file are disabled.
Format
Each line in logs.config file establishes and formats a custom transaction log file. Lines consist of the
following fields, separated by colons (:).
Example
The following example shows a custom log file named minimalist. It records the following information:
• The client host IP address (
chi)
• The client request universal resource identifier (
cqu)
• The proxy response status code (
pssc)
format:enabled:1:minimal:%<chi> / %<cqu> / %<pssc>:minimalist:ASCII:none
Example output to the minimalist file is as follows:
123.12.3.123 / GET http://earth/ocean/index.html HTTP/1.0 / 200
The following example shows a log file named test. It records the following information:
• The User-Agent value of the client request header (
cqh)
• The Retry-After value of the proxy response header (
psh)
format:enabled:1:test:%<{User-Agent}cqh> %<{Retry-After}psh>:test:ASCII:none
IMPORTANT After you modify the logs.config file, Traffic Manager has to reread the
configuration files. Run the
traffic_line -x command. If you are running a cluster,
you need only run the command for one node; the changes will propagate.
Field Allowed Inputs
format All lines must begin with the word format.
activation flag enabled
disabled
unique format identifier Use a unique integer for each custom log file you create.
format name Enter a name for the format you define.
format string Enter a
printf-style format string specifying the field symbols to be displayed
and how they should look in ASCII. Refer to Appendix E‚ Event Logging
Formats for a list of the available field symbols and their meanings. Field
symbols are indicated by
%<field_symbol> format. For example, to indicate
that
chi is the client host IP and not the string chi to be printed, enter %<chi>.
file name Enter a name for the custom log file you create.
file type ASCII
BINARY
file header data none—Enter none if you do not want header text.
header text—If you want your custom log file to have a header, enter the
appropriate text here.