Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 04 Aug 2013 11:54:11 +0100
From:      Frank Leonhardt <>
Subject:   Re: Archiving a log file
Message-ID:  <>
In-Reply-To: <>
References:  <> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On 04/08/2013 04:04, mikel king wrote:
> On Aug 3, 2013, at 7:11 PM, Frank Leonhardt <> wrote:
>> The answer isn't (AFAIK) newsyslog
> I did some more digging on the whole log piping thing and apache includes a nifty little application called rotatelogs which lives in /usr/local/sbin/rotatelogs on my system that I built form the ports. From the man page:
> 	 rotatelogs - Piped logging program to rotate Apache logs
> 	rotatelogs [ -l ] [ -f ] logfile rotationtime|filesizeM [ offset ]
> 	rotatelogs is a simple program for use in conjunction with Apache's piped logfile feature. It supports rotation based on a time interval or maximum size of the log.
> It looks pretty simple to use just create your log format directive like:
> 	LogFormat "%t \"%r\" %>s \"%{Referer}i\" %b" SpecialFormat
> 	CustomLog "| /usr/local/sbin/rotatelogs /var/log/httpd-access.log 86400" SpecialFormat
> I hope that helps. I know I shall be experimenting with this one tomorrow.

Thanks for looking at it, but I probably shouldn't have picked Apache as 
an example. I thought it would be something people were familiar with. 
The program writing the log is actually called flubnutz and it doesn't 
play nice with newsyslog, reopen handles on a signal or anything else. 
FWIW I've been using newsyslog since 1998 from most regular system 
services and I don't have any problem with it.

(I lied about it being called "flubnutz", before anyone Googles it - but 
it's not an Apache-specific issue, as Apache logs are handled well 
enough with newsyslog except where you're running virtual hosts with 
their own log files, in which case it's a PITA.).

Regards, Frank.

Want to link to this message? Use this URL: <>