Added ability to log exceptions while tests to given logger