]> git.ipfire.org Git - thirdparty/squid.git/commit
Support rotate=N option on access_log
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 18 Jan 2015 16:34:13 +0000 (08:34 -0800)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 18 Jan 2015 16:34:13 +0000 (08:34 -0800)
commitefc238716eb68db2888faac60423184a894f5483
tree6697db3a57bbe4fec315a7227598c77e7cf68664
parentd7e24049511d4ad98d7afc0544d4cb5eb5224a00
Support rotate=N option on access_log

Add a rotate=N option to access_log directive to set per-log what the
retained log count will be. At present it is only used by the stdio:
logging module, which is also the only one to use logfile_rotate
directive.

If this option is absent (as will be the common case) the log rotation
defaults to using the value of logfile_rotate directive.

Also, add missing dump output of other access_log options if they differ
from the defaults.

The use-cases for this are:

1) Unix fifo logging requires all the stdio: module operations except
that the normal rotate/rename operation is NOT performed on the fifo
socket. It makes more sense to add this option which can also meet case
#2 than to create a whole new module just for fifo.

2) managing only some access_log files with a third-party log manager.
Those specific logs need rotate=0, but the Squid managed logs may
require non-0 values.
14 files changed:
src/adaptation/icap/icap_log.cc
src/cache_cf.cc
src/cf.data.pre
src/log/CustomLog.h
src/log/File.cc
src/log/File.h
src/log/ModDaemon.cc
src/log/ModStdio.cc
src/log/ModSyslog.cc
src/log/ModUdp.cc
src/log/TcpLogger.cc
src/log/TcpLogger.h
src/log/access_log.cc
src/store_log.cc