Out of the box, rotated logs are called app.log.1, app.log.2.gz and so on, and every rotation renumbers the whole row. Looking for the log of one particular Saturday means opening files until you hit the right one.
/var/log/myapp/*.log {
daily
rotate 14
compress
dateext
dateyesterday
}
dateext names each rotated file after the date, like app.log-20261127.gz, and a file keeps that name until it’s deleted. I like that for backups too, since yesterday’s file no longer looks changed just because it got a new number.
dateyesterday is optional, but I’d add it to daily logs. A daily run in the early morning would otherwise give the file full of Thursday’s lines Friday’s date. With it, the date in the name matches the timestamps inside.
You can pick your own format with dateformat, for example dateformat -%Y-%m-%d. Keep the year first: logrotate sorts the names to find the oldest file to delete, and a day-month-year format makes it pick the wrong ones.
The caveat: the default format only goes down to the day, so a log can rotate once a day at most. A second run on the same day finds the target name already taken and skips the rotation, which can surprise you when you combine dateext with maxsize. For hourly the default format includes the hour.
Further reading: logrotate(8) man page