Extending sr_'s comment, I'm using logrotate to housekeep a nightly SQL dump. I have this configuration in /etc/logrotate.d/mydbdump:
/var/backups/dump.sql {
daily
rotate 7
missingok
create 640 root root
compress
}
It basically takes the /var/backups/dump.sql file (you would specify the name of your logfile instead), compresses it and renames it to dump.sql.1.gz. Before that, it rotates the old dump.sql.1.gz to dump.sql.2.gz and so on, and deletes the oldest one.
logrotate itself is usually called by cron, so have a look at your /etc/cron* directories to control when it's run.
logrotateis your friend