I have a logrotate.d config file that looks something like this:
/home/myapp/log/* {
daily
compress
dateext
ifempty
delaycompress
olddir /home/myapp/baklog
}
There are a few particular log files where I want to apply additional rules, such as "mail". How can I apply additional rules to just some files?
If I add another rule above that matches the additional files (e.g. /home/myapp/log/warning.log { ... }
, I get an error like error: /etc/logrotate.d/myapp:3 duplicate log entry for /home/myapp/log/warning.log
.
How can I specify multiple rules that match particular files in an overlapping kind of way?