I have set a logrotate config file like this:
/var/log/tomcat/catalina.out{
copytruncate
daily
dateext
rotate 10
missingok
notifempty
}
And in my /sysconfig/cron settings file I have set DAILY_TIME="00:00"
It rotates the logs but if a log has the date catalina.out-20150415
it contains log info from date 20150414, this is one day before.
Should I change the date in the /sysconfig/cron file or maybe I could achive this with the prerotate/endscript option?
As far as I know DAILY_TIME works in 15minute gaps and I would like to have as perfet daily logs that contain just the information of one day as possible. What is what I get now, but the date in the name of the files does not adhere to the contents within them.
Note: I am under SLES, where daily cron jobs work a bit different from other distros.