Logging
Squid logs all the client requests and events to files. Squid provides various directives to control the location of log files, format of log messages, and to choose which requests to log. Let's have a brief look at some of the directives. We'll learn about logging in detail in Chapter 5, Understanding Log Files and Log Formats.
Log formats
We can define multiple log formats using the directive logformat
as well as the pre-defined log formats supplied by Squid. Log formats are basically an arrangement of one or more pre-defined format codes. Various log formats such as squid
, common
, combined
, and so on, are provided by Squid, by default. We'll have a detailed look at defining additional log formats in Chapter 5.
Log file rotation or log file backups
Over a period of time, the log files grow in size. The common practice is to move the older logs to separate files as a backup or for analysis, and then continue writing the logs to the original log file. The default Squid behavior is to...