mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-14 13:33:08 +00:00
[DS-3832] Don't spew stack traces for simple exceptions.
This commit is contained in:
@@ -45,7 +45,6 @@ import org.apache.commons.lang.time.DateFormatUtils;
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.impl.client.DefaultHttpClient;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.solr.client.solrj.SolrQuery;
|
||||
import org.apache.solr.client.solrj.SolrServer;
|
||||
import org.apache.solr.client.solrj.SolrServerException;
|
||||
@@ -89,6 +88,8 @@ import org.dspace.statistics.util.DnsLookup;
|
||||
import org.dspace.statistics.util.LocationUtils;
|
||||
import org.dspace.statistics.util.SpiderDetector;
|
||||
import org.dspace.usage.UsageWorkflowEvent;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
@@ -102,7 +103,9 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
* @author mdiggory at atmire.com
|
||||
*/
|
||||
public class SolrLoggerServiceImpl implements SolrLoggerService, InitializingBean {
|
||||
private static final Logger log = Logger.getLogger(SolrLoggerServiceImpl.class);
|
||||
private static final Logger log
|
||||
= LoggerFactory.getLogger(SolrLoggerServiceImpl.class);
|
||||
|
||||
private static final String MULTIPLE_VALUES_SPLITTER = "|";
|
||||
protected SolrServer solr;
|
||||
|
||||
@@ -358,7 +361,7 @@ public class SolrLoggerServiceImpl implements SolrLoggerService, InitializingBea
|
||||
doc1.addField("longitude", longitude);
|
||||
}
|
||||
} catch (IOException | GeoIp2Exception e) {
|
||||
log.error("Unable to get location of request", e);
|
||||
log.error("Unable to get location of request: {}", e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -445,7 +448,7 @@ public class SolrLoggerServiceImpl implements SolrLoggerService, InitializingBea
|
||||
doc1.addField("longitude", longitude);
|
||||
}
|
||||
} catch (GeoIp2Exception | IOException e) {
|
||||
log.error("Unable to get location of request", e);
|
||||
log.error("Unable to get location of request: {}", e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user