The configuration of my rsyslog file in logrotate :
/opt/mapvariable/log/myapp
{
rotate 24
hourly
maxsize 10k
compress
ifempty
postrotate
reload rsyslog >/dev/null 2>&1 || true
endscript
}
I have copied logrotate from cron.daily to cron.hourly.
Then I executed following commands :
sudo logrotate -f /etc/logrotate.conf
sudo logrotate -f /etc/logrotate.conf
Still, it's not working. Any guidance will be much helpful.
Thank You.