[syslog-ng] Logrotate - recursive directories

Valdis.Kletnieks at vt.edu Valdis.Kletnieks at vt.edu
Mon Jun 13 22:14:45 CEST 2005


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. ;)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 226 bytes
Desc: not available
Url : http://lists.balabit.hu/pipermail/syslog-ng/attachments/20050613/66c983fc/attachment.pgp


More information about the syslog-ng mailing list