I rotate my nginx access log files with logrotate an have the following config:
/var/www/logs/*.log {
daily
missingok
dateext
dateformat _%Y-%m-%d
dateyesterday
rotate 90
compress
delaycompress
compressext
notifempty
create 0640 www-data www-data
sharedscripts
postrotate
[ -f /var/run/nginx.pid ] && kill -USR1 `cat /var/run/nginx.pid`
endscript
}
When cron runs that script for example at 5am all logs between 0am and 5am in the file will be rotated. I want a log file for exactly one day from midnight to 11.59pm
Is there an opportunity to configure this?