Log file scenario
The following example shows how you can customize logging to meet your
needs. Suppose you have just purchased and installed Caching Proxy. You want to set
up your server to log access and error information with the following requirements:
- Logs must carry a local time stamp and must be in a common log file format.
- Access logs must be purged when they are more than 30 days old or when
the logs reach a collective size of 25 MB.
- The following request types must not be logged to the access logs:
- Requests for GIF images
- Requests from hosts with IP addresses that match the pattern 130.128.*.*
- Redirection requests (these requests yield a return code between 300 and
399)
To configure Caching Proxy to keep logs according to these criteria, in the Configuration and Administration forms,
select Server Configuration -> Logging.
- Optionally, select the Log Files form to specify
paths for the access log files. (Default paths are provided.)
- Use the Log Archiving form to specify how to archive
the files:
- Specify Purge as the archiving method.
- Under When using Purge, fill in the fields as follows:
- Delete logs older than 30 Days
- Delete logs larger than 25 MB
- Use the Access Log Exclusions form to filter log
entries as follows:
- In the Do not log requests from the following hostnames
or IP addresses list, add 130.128.*.* in the Excluded Host field.
- Under Do not log requests for files of the following
MIME types, select the image/gif check box.
- Under Do not log requests with the following Return Codes, select the (3xx) Redirection check box.
Following these directions produces the following lines in the proxy configuration
file:
LogArchive purge
PurgeAge 30
PurgeSize 25
AccessLogExcludeURL *.gif
NoLog 130.128.*.*
AccessLogExcludeReturnCode 300