newsyslog naming scheme could be improved?

Matthew Seaman m.seaman at infracaninophile.co.uk
Tue Oct 14 07:49:06 UTC 2008


-----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-----


More information about the freebsd-questions mailing list