
104
Chapter 12
Working with Log Files
Using traditional custom formats
To create traditional custom log files, you must enable the traditional custom log format option and edit Traffic
Server’s traditional log configuration file (
logs.config
). You must specify the information you want to
display in your log files by entering printf-style format strings.
You can create as many custom log file formats as necessary. However, log files consume space quickly, so
do not create more than you really need.
To create traditional custom log formats:
1. Access Traffic Manager from your browser (refer to
Accessing Traffic Manager‚ on page 8
).
2. On the Configure tab, click the Logging button.
3. Scroll to the Custom Logs section of the Logging page (shown below).
4. Select the Enabled: On button.
5. Select the Traditional button.
6. Click the Make These Changes button, then exit Traffic Manager.
7. Telnet into the HP web cache appliance and select Shell Access as described in
Overview of Access
Methods‚ on page 7
.
8. Open the
logs.config
file with Vi.
9. To add a traditional custom log specification, enter a line in the
logs.config
file with the following
format:
format:enable_flag:format_id:format_name:string:file_name:type:header
Specify values for the fields:
NOTE
Each line in the
logs.config
file produces one file (if the format is active).
Field
Description
format
All lines must begin with the word
format
.
enable_flag
This field enables or disables transaction logging using this format. You can enter
one of the following:
•
enabled
•
disabled
If you enter
disabled
, you have defined a custom log file format but are not
using it.
format_id
Use a unique integer to identify each of your custom log formats.
format_name
Enter a name for this custom format.
string
Enter a
printf
-style format string specifying the field symbols to be displayed
and how they should look in ASCII. For a list of the available field symbols and
their meanings, refer to
Appendix E‚ Event Logging Formats
.