syslogd daemon based on busybox allows this arguments on startup script:
-s SIZE Max size (KB) before rotation (default 200KB, 0=off)
-b N N rotated logs to keep (default 1, max 99, 0=purge)
For example:
$ syslogd -n -s 10240 -b 3
allows /var/log/messages being rotated "3" times, creating backup files of 10MB locally before starting the rotation process (deleting oldest files):
/var/log/messages
/var/log/messages.0
/var/log/messages.1
/var/log/messages.2
I would like to emulate this syslogd rotation behaviour (creating the /var/log/messages.X files locally) but using rsyslog (with new object oriented syntax) instead of syslogd. Is this possible? I was reading documentation but haven't found nothing useful.