heh, i just emailed the group with another solution i came up with. i did not really want to go outside the logrotate.d/syslog-ng config and add more scripts to the server. Valdis.Kletnieks@vt.edu wrote:
On Mon, 13 Jun 2005 14:38:08 EDT, Ken Garland said:
I have syslog-ng setup to add hostname dynamically. When a new server is pointed to the central log server it creates a /var/log/syslogs/$hostname dir and all logs from that host are put in there. in /etc/log/rotate.g/syslog-ng I have tried putting in /var/log/syslogs/* and this will not work.
Is there a way for logrotate to search directories recursively?
Think outside the box. ;)
/var/log/syslogs/$hostname/$day will automagically start a new log each day.
Then 'find /var/log/syslogs -type f -mtime +31 -exec rm {} \;' for the cleanup. ;)
------------------------------------------------------------------------
_______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng Frequently asked questions at http://www.campin.net/syslog-ng/faq.html