[squid-users] How do I rotate access.log?

roee klinger roeeklinger60 at gmail.com
Tue Dec 29 17:33:40 UTC 2020


Thanks for your reply,

I am using a Raspberry Pi and the latest version of Squid which I installed
from apt.

In my cache.log, here are all my logging and rotation-related messages:

2020/12/29 17:37:14 kid1| logfileRotate: daemon:/var/log/squid/access.log
2020/12/29 17:37:14 kid1| logfileRotate: daemon:/var/log/squid/access.log
2020/12/29 17:37:14 kid1| Logfile: opening log
daemon:/var/log/squid/access.log
2020/12/29 17:37:14 kid1| Logfile Daemon: opening log
/var/log/squid/access.log
2020/12/29 17:37:14 kid1| Store logging disabled
2020/12/29 18:22:39 kid1| Logfile: opening log
stdio:/var/spool/squid/netdb.state
2020/12/29 18:22:39 kid1| Logfile: closing log
stdio:/var/spool/squid/netdb.state

Thanks.


On Tue, Dec 29, 2020 at 6:40 PM Alex Rousskov <
rousskov at measurement-factory.com> wrote:

> On 12/29/20 10:36 AM, roee klinger wrote:
>
> >     logfile_rotate 10
> >     access_log daemon:/var/log/squid/access.log logformat=xxxx rotate=10
>
> > running "squid -k rotate" still does nothing for the access.log file.
>
> Please note that, according to Squid documentation, your Squid is
> slightly misconfigured:
>
> >       rotate=N                Specifies the number of log file rotations
> to
> >                               make when you run 'squid -k rotate'. [...]
> >                               Only supported by the stdio module.
>
> You are not using an "stdio" module. You are using a "daemon" module.
>
> This minor misconfiguraiton, if any, does not explain the lack of
> rotations. The deamon module should still rotate based on your global
> logfile_rotate directive setting.
>
> What is your Squid version? What logging and rotation-related messages
> do you see in your cache.log (check both the pre-rotation and
> post-rotation files)?
>
> Alex.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20201229/558db1d0/attachment.htm>


More information about the squid-users mailing list