Exception logging

Add possibility to log message + exception.

It seams to be something wrong with line-edings so the diff is showing much more than is rely changed, can you commit, tried with different gitattributes but dont find correct settings.