(From http://www.ualberta.ca/~dostatni/moodlemoot2013/mdl_log.html)
The following script is executed daily. It generates a CSV file with all the moodle activity for previous day. That file is saved together with apache access and error logs in a log server. This data is used to verify student challenges ( eg. "I couldn't submit my assignment because there was a problem with the system"), identify trends and trace the origin of errors (to a specific code deployment).
This level of archiving allows us to remove the mdl_log entries from the active database. Currently the logs take up about half of the size of the database on disk.