Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Aug 2013 23:04:53 -0400
From:      mikel king <mikel.king@olivent.com>
To:        Frank Leonhardt <freebsd-doc@fjl.co.uk>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Archiving a log file
Message-ID:  <37485629-94BD-48EF-B7A7-9ED4C5B9A6E5@olivent.com>
In-Reply-To: <51FD8E19.90403@fjl.co.uk>
References:  <51FD8E19.90403@fjl.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Aug 3, 2013, at 7:11 PM, Frank Leonhardt <freebsd-doc@fjl.co.uk> =
wrote:

> The answer isn't (AFAIK) newsy slog
>=20

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. =
=46rom the man page:

NAME=20
	 rotatelogs - Piped logging program to rotate Apache logs=20
SYNOPSIS
	rotatelogs [ -l ] [ -f ] logfile rotationtime|filesizeM [ offset =
]=20
SUMMARY=20
	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.=20

Regards,
Mikel King
BSD News Network
http://bsdnews.net
skype: mikel.king
http://twitter.com/mikelking





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?37485629-94BD-48EF-B7A7-9ED4C5B9A6E5>