19 Jul
2006
19 Jul
'06
8:52 p.m.
On Wed, 19 Jul 2006 18:34:25 -0000, Vadim Pushkin said:
The problem that I am having is rotating under syslog-ng, *NOT* MySql. Can anyone please provide me with a good method for rotating logs, where my logs are kept under various subdirs, depending on source address?
What I do is something along the lines of: 1) destination foo { file("/var/logs/whatever/messages-$MONTH$DAY"); }; so syslog-ng creates a seperate output file for each day. 2) A cronjob that then does 'find /var/logs/whatever -mtime +30 -exec rm {}\;' is all that's needed to clean up. Add salt, pepper, and documentation to taste.