Run time fault information

Does anyone know if I can or how the spark can store runtime fault information. ie if I get a hard fault and the spark restarts I can store it with a timestamp to be read back at a later time remotely.
I have noticed that the spark (while running my code ) will restart once and a while. but I don’t know why. So I would like to create a area to store some information that would otherwise be lost on a restart.

You’d probably have to look into how the Core handles the SOS messages. You should be able to extract and save any of the faults listed here http://docs.spark.io/troubleshooting/#troubleshoot-by-color-flashing-red

This would definitely require compiling locally so you can actually edit the underlying code (outside of setup() and loop())

Good luck. Let us know if you make progress. Feel free to respond back with questions