<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal>Have you tried to use the OS logrotate?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>----<o:p></o:p></p><p class=MsoNormal>Eliezer Croitoru<o:p></o:p></p><p class=MsoNormal>Tech Support<o:p></o:p></p><p class=MsoNormal>Mobile: +972-5-28704261<o:p></o:p></p><p class=MsoNormal>Email: <a href="mailto:ngtech1ltd@gmail.com">ngtech1ltd@gmail.com</a><o:p></o:p></p><p class=MsoNormal>Zoom: Coming soon<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b>From:</b> squid-users <squid-users-bounces@lists.squid-cache.org> <b>On Behalf Of </b>roee klinger<br><b>Sent:</b> Sunday, January 10, 2021 5:25 PM<br><b>To:</b> squid-users@lists.squid-cache.org<br><b>Subject:</b> Re: [squid-users] How do I rotate access.log?<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>Hey,<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>I just wanted to give an update in case anyone is interested, I was not able to find a solution, <o:p></o:p></p></div><div><p class=MsoNormal>Instead, I set "logfile_rotate 0" and wrote my own custom script to rotate the logs and I am running it as a cron, works just fine.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Thanks for trying to help.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>On Fri, Jan 1, 2021 at 1:38 AM Alex Rousskov <<a href="mailto:rousskov@measurement-factory.com">rousskov@measurement-factory.com</a>> wrote:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><p class=MsoNormal>On 12/31/20 1:39 PM, roee klinger wrote:<br><br>> 2020/12/31 20:33:49 kid1| Logfile: opening log daemon:/var/log/squid/access.log<br>> 2020/12/31 20:33:49 kid1| Logfile Daemon: opening log /var/log/squid/access.log<br>> 2020/12/31 20:33:49 kid1| Store logging disabled<br>> 2020/12/31 20:33:57 kid1| logfileRotate: daemon:/var/log/squid/access.log<br>> 2020/12/31 20:33:57 kid1| logfileRotate: daemon:/var/log/squid/access.log<br>> 2020/12/31 20:33:57 kid1| Logfile: opening log daemon:/var/log/squid/access.log<br>> 2020/12/31 20:33:57 kid1| Logfile Daemon: opening log /var/log/squid/access.log<br>> 2020/12/31 20:33:57 kid1| Store logging disabled<br><br>The second set of the "opening log" lines at 20:33:57 concern me -- why<br>would somebody start opening those files when you are asking Squid to<br>rotate the logs. However, this could be a red herring. Do you get the<br>same kind of output when you send USR1 signal to the process identifier<br>in the PID file (instead of running "squid -k rotate")?<br><br><br>> Any tips?<br><br>I have not looked at v4.6 code, but I do not see anything in the more<br>recent code that would make the visible effects of access.log rotation<br>conditional except setting logfile_rotate to zero. I also do not see any<br>obviously relevant changes in v4 change.log (although there was one<br>access-logging bug fixed).<br><br>A few thing could go wrong. If you do not get better advice, I can<br>suggest the following:<br><br>* If you are a developer, I would recommend attaching a debugger to the<br>logging daemon process to (a) make sure it gets the rotation command<br>from Squid and (b) to understand why it ignores that command.<br><br>* If you are a sysadmin, you may be able to attach strace to the logging<br>daemon process and share its output. This is best done without user<br>traffic going through Squid to avoid accidentally sharing user info.<br>Here are rough steps:<br><br>1. Attach strace to the running daemon process (-p). Configure strace to<br>log at least 100 bytes of system call data (-s 100). Tell strace to<br>write the output into a file.<br><br>2. Rotate.<br><br>3. Wait a few seconds.<br><br>4. Stop strace. Compress and share a link to its output file.<br><br><br>Cheers,<br><br>Alex.<o:p></o:p></p></blockquote></div></div></body></html>