13 Jun
2005
13 Jun
'05
9:14 p.m.
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. ;)