mirror of https://github.com/apache/lucene.git
SOLR-2124: do not log stack trace for Service Disabled / 503
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1302970 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
30f5ecb2f1
commit
255f763640
|
@ -692,6 +692,9 @@ Bug Fixes
|
||||||
JARJAR (http://code.google.com/p/jarjar/) was used to change the package name
|
JARJAR (http://code.google.com/p/jarjar/) was used to change the package name
|
||||||
to org.apache.solr.internal.csv. (Uwe Schindler, Emmanuel Bourg)
|
to org.apache.solr.internal.csv. (Uwe Schindler, Emmanuel Bourg)
|
||||||
|
|
||||||
|
* SOLR-2124: Do not log stack traces for "Service Disabled" / 503 Exceptions (PingRequestHandler, etc)
|
||||||
|
(James Dyer, others)
|
||||||
|
|
||||||
Other Changes
|
Other Changes
|
||||||
----------------------
|
----------------------
|
||||||
* SOLR-2922: Upgrade commons-io and commons-lang to 2.1 and 2.6, respectively. (koji)
|
* SOLR-2922: Upgrade commons-io and commons-lang to 2.1 and 2.6, respectively. (koji)
|
||||||
|
|
|
@ -75,6 +75,10 @@ public class SolrException extends RuntimeException {
|
||||||
|
|
||||||
public void log(Logger log) { log(log,this); }
|
public void log(Logger log) { log(log,this); }
|
||||||
public static void log(Logger log, Throwable e) {
|
public static void log(Logger log, Throwable e) {
|
||||||
|
if (e instanceof SolrException
|
||||||
|
&& ((SolrException) e).code() == ErrorCode.SERVICE_UNAVAILABLE.code) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
String stackTrace = toStr(e);
|
String stackTrace = toStr(e);
|
||||||
String ignore = doIgnore(e, stackTrace);
|
String ignore = doIgnore(e, stackTrace);
|
||||||
if (ignore != null) {
|
if (ignore != null) {
|
||||||
|
@ -86,6 +90,10 @@ public class SolrException extends RuntimeException {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void log(Logger log, String msg, Throwable e) {
|
public static void log(Logger log, String msg, Throwable e) {
|
||||||
|
if (e instanceof SolrException
|
||||||
|
&& ((SolrException) e).code() == ErrorCode.SERVICE_UNAVAILABLE.code) {
|
||||||
|
log(log, msg);
|
||||||
|
}
|
||||||
String stackTrace = msg + ':' + toStr(e);
|
String stackTrace = msg + ':' + toStr(e);
|
||||||
String ignore = doIgnore(e, stackTrace);
|
String ignore = doIgnore(e, stackTrace);
|
||||||
if (ignore != null) {
|
if (ignore != null) {
|
||||||
|
|
Loading…
Reference in New Issue