Logrotation when filenames includes date

Sure. Look at the rotate option in the config file. http://linuxcommand.org/man_pages/logrotate8.html

If you set it to rotate daily, and keep 5 files, then it will only keep the last 5 long files. Also, since your file name changes, look at the wildcard section of the above man page.

You can also do this.

find /pathtologs/* -mtime +5 -exec rm {} \;

This will delete anything with a modification time of longer then 5 days.