Squid writes to three separate log files—one for recording client access requests, one for cache events, and one for debugging information. The most useful is the access log file, which can be analyzed by a program like Webalizer (covered in Chapter 39) to generate reports on clients, requested URLs, and individual users. Logging is enabled by default to paths compiled into Squid, and thus is dependant upon your operating system—but you can change the destinations for log files and some details of the access log format.
To configure how and where logs are written, follow these instructions:
Many Linux packages of Squid include a configuration file for the logrotate program to have the log files rotated, compressed, and eventually deleted when they become too old. If you change the paths to the log files using the instructions above, rotation will no longer be done and the logs will consume an unlimited amount of disk space. On a busy system, this could lead to a shortage of space on the logging filesystem that would be avoided if rotation were in effect.
13.58.77.161