I have a logrotate policy which runs once daily as it is part of cron.daily. I want to trigger logrotate for files when the reach a certain size. So i am looking for a way to make file size the trigger, rather than it happening at hourly, daily or some set interval of time. Is it possible to do something like that?
Example for one file (I have many such files with different size value)
/var/log/folder/localhost.access {
size 500M
copytruncate
create somestr somestr
dateext
rotate 5
compress
missingok
}