Fixes logging issue with exceptions being raised formatting Solr doc.