[squid-users] Rotate squid log files

Amos Jeffries squid3 at treenet.co.nz
Wed Nov 17 01:23:10 UTC 2021


On 12/11/21 00:05, Omar Salem - KSACO IT Manager wrote:
> hi all,
> 
> I have ran the command (c:\squid\sbin\squid -n squid -k rotate)  to 
> rotate log files (Cache,store and access) but only cache and store logs 
> were rotated.
> I need to rotate access.log too because it reached 4GB.
> 
> Also how to see users visited websites in date and time because it is 
> not included in access.log.
> 


Things to check on:


A) does your access.log (and the directory path it site in) have the 
right permissions?
  Best way to test this is to shutdown squid, move the existing 
access.log file to a different path/name and restart squid. A new 
access.log file should be created with correct ownership.
  If a new file is *not* created, then there is a problem with the path. 
cache.log should have details about what is broken amongst the startup 
messages.


B) is your Squid configured or built to rely on external systems 
managing the access.log file rotation/renaming?

That is determined by the logfile_rotate directive. We publish Squid 
code have a default of 10, but some vendors provide integration with 
their OS logging and patch the default to be 0. You can set the 
directive in squid.conf to test for yourself Squid's rotation behaviour.

  NP: if your vendor is using third-party software to manage access.log 
you should use whatever rotation feature that software offers instead of 
"-k rotate"


Cheers,
Amos


More information about the squid-users mailing list