Re: r9630 and debug_options rotate=N setting

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Wed, 29 Apr 2009 19:59:08 +1200

Alex Rousskov wrote:
> On 04/12/2009 02:17 AM, Amos Jeffries wrote:
>> revno: 9630
>> ...
>> - adds debug_options rotate=N setting
>>
>>
>> <tag>logfile_rotate</tag>
>> + <p>No longer controls cache.log rotation. Use debug_options
>> rotate=N instead.
>
> This change seems rather odd, backward-incompatible,

Fully backward compatible. Its an optional argument which can be placed
anywhere on the debug_options list of optional arguments. And likewise
specified as many time 0-N as wanted with last configured being used.

> and inconvenient in
> many typical setups where all logs must be rotated and archived
> together.

Explicitly does not alter the timing of rotation. Merely the number of
logs kept when rotated. This is to improve system reliability when
running with ALL,9 or other likewise verbose debug levels (thus its
linkage with the debug_options).

One of the big hassles I've had and others appear to be in the same boat
is requiring many access.log to be kept (365 for me). Yet only really
needing one or two cache.log for administrative debugging purposes.

> Could you please restore the old behavior _if_ no explicit
> "debug_options rotate=N" was specified?

If unspecified, a default is set to 1. That can be changed to 10 again
in debug.cc and cf.data.pre.

You _could_ explicitly link it back to the Config logfile_rotate setting
just or a default on legacy occasions but that again makes debug depend
on ::Config which spoils the effect of removing the circular
dependencies liblogs.la -> squid -> debug.* ->liblogs.la .

>
> Also, does not the new rotate option belong to cache_log? Debug_options
> are about debugging and not cache log file maintenance...

cache.log being about debugging I picked this to be its control point.

Good point, though cache_log will need a new parser and type for that
parser to be able to add any options. At which point I think it might
be worth merging debug_options and cache_log together completely.

But thats a much bigger change. Do you think it worth doing?
ie cache_log <filename> [rotate=N] ALL,1 [...]

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE6 or 3.0.STABLE14
   Current Beta Squid 3.1.0.7
Received on Wed Apr 29 2009 - 07:59:17 MDT

This archive was generated by hypermail 2.2.0 : Wed Apr 29 2009 - 12:00:04 MDT