Re: [squid-users] squid log with date ext

From: Adrian Chadd <adrian@dont-contact.us>
Date: Fri, 11 May 2007 07:34:51 +0800

On Thu, May 10, 2007, Kinkie wrote:
> On 5/10/07, groupslist@gmail.com <groupslist@gmail.com> wrote:
> >Hi,
> >
> >Is it possible to generate squid log file with date extension
> >(like /var/log/squid/access.log-`date +%Y%m%d` format) in real time (i mean
> >it is not generated by logrotate) ?
>
> Currently it's not possible.
> You can rename old files after rotating them with "squid -k rotate";
> it's a relatively simple exercise in shell scripting.

And if someone writes it up I'd be happy to include it in the base distribution.
The trick: use head -1 and tail -1 on the rotated logfile to figure out its
time span, then rename the logfile to that..

Adrian
Received on Thu May 10 2007 - 17:35:07 MDT

This archive was generated by hypermail pre-2.1.9 : Fri Jun 01 2007 - 12:00:04 MDT