Weekly rotation works fine until a service gets stuck in an error loop and its log is several gigabytes by Tuesday. logrotate can keep an eye on the size as well as the calendar, with maxsize.
/var/log/myapp/*.log {
weekly
maxsize 100M
rotate 5
compress
missingok
}
The log still rotates once a week, but also as soon as it’s bigger than 100 MB, even before the week is over. Sizes take k, M and G. The opposite also exists: minsize rotates on the schedule, but only once the file has grown past the size you give, which suits a log that only gets a few lines a week.
Don’t confuse it with plain size. That one ignores the time interval completely, so a log with size 100M only ever rotates on size.
The caveat: logrotate isn’t a daemon that watches your files. It only checks when it runs, and the man page notes that it’s usually started once a day by cron or by logrotate.timer. A log that grows 20 GB in an afternoon still gets to 20 GB before the next run notices. If that’s a real risk for one service, run logrotate more often, and keep in mind that the man page says the same about hourly: the keyword alone doesn’t help until logrotate itself runs every hour.
Further reading: logrotate(8) man page