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?
logrotatemaintainers wanted to flag that as an error. For now, use a wild card that excludes the files you want to set with different options. – Old Pro May 12 '12 at 15:48[a-hj-z]*to select all files that begin with a lower case letter other thani. If your special file is the only one whose name begins withithen that would be "a wild card that excludes the files you want to set with different options". – Old Pro May 14 '12 at 23:14