So I have a number of apache logs I like to handle with logrotate on a developer box. Some of them are for user sandboxes, others are for staging versions and such.
The logrotate config looks like:
/srv/www/logs/beta/*log
/srv/www/logs/www/*log
/home/developerx/logs/*.log {
daily
rotate 100
olddir archive
sharedscripts
postrotate
/sbin/service httpd reload > /dev/null 2>/dev/null || true
endscript
}
I would like to customize some of the settings for beta versus a sandbox, like rotate 10 instead of 100 for a sandbox. I could create a new context for this, but if I do the postrotate "reload" for multiple contexts I worry that the process will be reloaded multiple times.
As a secondary question, is there any way to determine the order in which logrotate will process these entries? Alphabetical by filename, and first-to-last within a file?