Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Oct 2008 08:48:49 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Walt Pawley <walt@wump.org>
Cc:        Kelly Jones <kelly.terry.jones@gmail.com>, freebsd-questions@freebsd.org
Subject:   Re: newsyslog naming scheme could be improved?
Message-ID:  <48F44EE1.10206@infracaninophile.co.uk>
In-Reply-To: <p0624088fc5196caac074@[10.0.0.10]>
References:  <26face530810110933o1403705o625586ac53b309fb@mail.gmail.com> <p0624088fc5196caac074@[10.0.0.10]>

next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

Walt Pawley wrote:
| At 9:33 AM -0700 10/11/08, Kelly Jones wrote:
|> newsyslog rotates logfiles so that messages.0.gz is yesterday's file,
|> messages.1.gz is the day before's, etc.
|>
|> This is ugly.
| 
| IMHO, this is worse than merely ugly. I gave up "rotating" log
| files a long time ago when I kept running into problems that
| needed extensive time periods worth of log data with which to
| resolve issues. I use some modifications to the periodic
| scripts to do the log data archiving with time related names.
| 
| Of course, if you're generating megabytes of compressed log
| data every day, this is likely impractical but it works well
| for systems I normally use.

I note that syslog.conf allows you to pipe log messages into some other
application.  Simply using cronolog (or rotatelogs from one of the Apache
ports) would allow you to create date-stamped logfile names pretty easily.

Eg.

*.*                                             |/usr/local/sbin/cronolog /var/log/all-%Y-%m-%d.log

This doesn't provide control of file permissions or compression of old log
files, but either of those are relatively simple to fix.

	Cheers,

	Matthew

- -- 
Dr Matthew J Seaman MA, D.Phil.                       Flat 3
~                                                      7 Priory Courtyard
PGP: http://www.infracaninophile.co.uk/pgpkey         Ramsgate
~                                                      Kent, CT11 9PW, UK
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEAREDAAYFAkj0TuEACgkQ3jDkPpsZ+VYhMQCfTMJFKWSGWLAOrbQgbZ3HFEWo
DWgAoJDLjWy7kSwPxAzmUcXcZW1B1v0m
=k4af
-----END PGP SIGNATURE-----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48F44EE1.10206>