Hijacking Unity's debug output

Unity is great at logging all its output, both when I call Debug.Log and when an exception is thrown, but I would like a better system for being able to gather these outputs when I’m not the user. I have a REST api that I use for logging on other programs I write, and I would like to be able to use this with Unity as well. I have a library that lets me write to my logger with a simple call, but I’m not sure how to hook in to Unity’s output so that I can log all the exceptions.

You can register your own callback with Application.RegisterLogCallback.

See: http://docs.unity3d.com/ScriptReference/Application.RegisterLogCallback.html