Add collection name to the error message logged in OCP

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1627078 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shalin Shekhar Mangar 2014-09-23 16:11:41 +00:00
parent 49429d07b6
commit cc2baddb76
1 changed files with 10 additions and 2 deletions

View File

@ -625,8 +625,16 @@ public class OverseerCollectionProcessor implements Runnable, Closeable {
}
}
} catch (Exception e) {
SolrException.log(log, "Collection " + operation + " of " + operation
+ " failed", e);
String collName = message.getStr("collection");
if (collName == null) collName = message.getStr("name");
if (collName == null) {
SolrException.log(log, "Operation " + operation + " failed", e);
} else {
SolrException.log(log, "Collection: " + collName + " operation: " + operation
+ " failed", e);
}
results.add("Operation " + operation + " caused exception:", e);
SimpleOrderedMap nl = new SimpleOrderedMap();
nl.add("msg", e.getMessage());