mirror of https://github.com/apache/lucene.git
SOLR-4760: Include core name in logs when loading schema.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1480882 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f8ee486b21
commit
f3bb1d7d6f
|
@ -154,6 +154,11 @@ Detailed Change List
|
|||
Bug Fixes
|
||||
----------------------
|
||||
|
||||
Other Changes
|
||||
----------------------
|
||||
|
||||
* SOLR-4760: Include core name in logs when loading schema.
|
||||
(Shawn Heisey)
|
||||
|
||||
================== 4.3.0 ==================
|
||||
|
||||
|
|
|
@ -432,11 +432,20 @@ public class IndexSchema {
|
|||
final XPath xpath = schemaConf.getXPath();
|
||||
String expression = stepsToPath(SCHEMA, AT + NAME);
|
||||
Node nd = (Node) xpath.evaluate(expression, document, XPathConstants.NODE);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("[");
|
||||
sb.append(loader.getCoreProperties().getProperty(NAME));
|
||||
sb.append("] ");
|
||||
if (nd==null) {
|
||||
log.warn("schema has no name!");
|
||||
sb.append("schema has no name!");
|
||||
log.warn(sb.toString());
|
||||
} else {
|
||||
name = nd.getNodeValue();
|
||||
log.info("Schema " + NAME + "=" + name);
|
||||
sb.append("Schema ");
|
||||
sb.append(NAME);
|
||||
sb.append("=");
|
||||
sb.append(name);
|
||||
log.info(sb.toString());
|
||||
}
|
||||
|
||||
// /schema/@version
|
||||
|
|
Loading…
Reference in New Issue