Support for rolling logs

Adds support for rolling logs. When the log is rolled over diagnostics information is added to the top of the new log.
Does this need a conversion, or whatever it is we call those things that lets us understand old settings?