Add OnLogMessage and OnLogError

<VoiDeD> you know you can do the PR yourself right
<McKay> but then I'll get yelled at for your bad code
<VoiDeD> or you'll get a push started for a better/different implementation