Created attachment 265318 [details] Patch file Add periodic script to rotate log files each week.
Created attachment 265319 [details] Updated patch file Merge 2 SUB_FILESs in Makefile.
Will it not interfere with the standard log rotation method? Squid is in ports for very long time, and people who are using it are already rocating logs in their own way. # grep squid /etc/newsyslog.conf /var/log/squid/access.log squid:wheel 640 54 * $W1D0 XC /var/run/squid/squid.pid
(In reply to Marek Zarychta from comment #2) It is disabled by default and user who want to use it need to enable it explicitly.
(In reply to Yasuhiro Kimura from comment #3) Yes, but why not use standard method and/newsyslog.conf.d files, like other ports do, for example net-mgmt/net-snmp or sysutils/nut ? Is squid able to keep the track of number of the files rotated this way and compress them ?
(In reply to Marek Zarychta from comment #4) Squid provides multiple types of log file. And IIUC squid doesn't provide way to rotate only one type of log file. On the other hand newsyslog check single log file and tries to rotate it. As a result they don't work well with each other. You may say periodic script doesn't work so well either. But I don't think it bad idea to provide user option to choose. It is maintainer who decides whether my patch is accepted, and when it is accepted then it is each user who decides whether he use it or not.
(In reply to Yasuhiro Kimura from comment #5) >On the other hand newsyslog check single log file and tries to rotate it. There can be more than one entry in newsyslog.conf(5) file. >It is maintainer who decides whether my patch is accepted, and when it is accepted then it is each user who decides whether he use it or not. Yes, it's always the maintainer who approves the change or not. Thank you for the contribution.
Better create patch against 7.3. Also you can get bug#290630 - I can't find time yet…