diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index ff5bb4dd513..edd23176441 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -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 ================== diff --git a/solr/core/src/java/org/apache/solr/schema/IndexSchema.java b/solr/core/src/java/org/apache/solr/schema/IndexSchema.java index 37f8c0b55af..55276a28633 100644 --- a/solr/core/src/java/org/apache/solr/schema/IndexSchema.java +++ b/solr/core/src/java/org/apache/solr/schema/IndexSchema.java @@ -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