Capture more data when logging errors.
Merge pull request #394 from selwin/log-extra_data

Capture more data when logging errors