101
Chapter 12
Working with Log Files
3. Edit the following variables:
4. Save and close the
records.config
file.
5. Run the command
traffic_line -x
to apply the configuration changes.
Choosing event log file formats
Traffic Server supports the following log file formats:
•
Standard formats, such as Squid or Netscape (see Chapter , “Using standard formats,” below).
•
Custom formats: traditional or XML-based. If you choose to use the XML-based format, you can also
create summary log files, which reduce the size of the generated log files significantly. (See
Using custom
formats‚ on page 103
.)
In addition to the standard and custom log file formats, you must choose whether to save log files in binary or
ASCII. See
Choosing binary or ASCII‚ on page 108
.
Using standard formats
The standard log formats include Squid, Netscape Common, Netscape extended, and Netscape Extended-2.
The standard log file formats can be analyzed with a wide variety of off-the-shelf log-analysis packages. You
should use one of the standard event log formats unless you need information that these formats do not provide.
See
Using custom formats‚ on page 103
.
When using standard log file formats, Traffic Server can make certain optimizations in collecting and
formatting the data since it knows what data will be needed, and in what format. It is faster to use the standard
log file formats instead of the custom log file formats. In addition, the Squid format is faster to process than
the Netscape formats. By default, Traffic Server is configured to use the Squid log file format only.
Setting standard log file format options
You can set standard log file format options by using Traffic Manager or by editing a configuration file
manually. Both procedures are provided below.
To select a standard event log file format from Traffic Manager:
1. Access Traffic Manager from your browser (refer to
Accessing Traffic Manager‚ on page 8
).
2. On the Configure tab, click the Logging button.
Variable
Description
proxy.config.log2.logfile_dir
Specify the name and path of the directory in which
you want to store event log files. The default is
logs
located in the directory where you installed Traffic
Server.
proxy.config.log2.max_space_mb_for_logs
Enter the maximum amount of space you want to
allocate to the logging directory.
proxy.config.log2.max_space_mb_headroom
Enter the tolerance for the log space limit.
IMPORTANT
Event log files consume a large amount of disk space. Creating log entries in multiple
formats at the same time can consume disk resources very quickly and adversely impact
Traffic Server performance.