bitcoin/bitcoin — pull request #1007 by gavinandresen (2012-03-29 13:08:55+00:00)
Title: Auto-remove logs, and decrease logfile size to 10M

This is an alternative to pull #1004 , to fix part of bug #999

Tested by doing a complete blockchain download and observing the number of log files every 2 minutes (see https://gist.github.com/2236954 -- maximum of 5 were created).

Removing log files before shutdown does make 'catastrophic database recovery' impossible, however catastrophic recovery is only possible if you have ALL of the log files available (all since the creation of the database), so the only situation in which that is an issue would be a brand-new user running Bitcoin for the first time and then suffering a disk-corrupting failure before they shutdown.