I have a number of files in /var/log/myapp/
that end in .log
. So I've created a
/var/log/myapp/*.log {
daily
create 644
rotate 90
compress
missingok
}
And this works perfectly well. I have a number of different log types in here and I want to change the retention on just some of the access logs (access_log_.log
) to have a retention of just 45 days. How then do I single these two out and change the retention time? If I append a new block like this:
/var/log/myapp/access_log_*.log {
daily
create 644
rotate 45
compress
missingok
}
Then it first does it's usual log rotate and then it log rotates those rotations creating a huge inception like mess. What is the better way to do this?