diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 9e798c37eeb..7cb753fde19 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -33,7 +33,8 @@ Apache ZooKeeper 3.4.5 Upgrading from Solr 4.x ---------------------- -TBD... +The "file" attribute of infoStream in solrconfig.xml is removed. Control this +via your logging configuration (org.apache.solr.update.LoggingInfoStream) instead. Detailed Change List ---------------------- diff --git a/solr/core/src/java/org/apache/solr/update/SolrIndexConfig.java b/solr/core/src/java/org/apache/solr/update/SolrIndexConfig.java index adef372522c..6c3155cb13f 100644 --- a/solr/core/src/java/org/apache/solr/update/SolrIndexConfig.java +++ b/solr/core/src/java/org/apache/solr/update/SolrIndexConfig.java @@ -157,17 +157,7 @@ public class SolrIndexConfig { log.info("IndexWriter infoStream solr logging is enabled"); infoStream = new LoggingInfoStream(); } else { - log.warn("IndexWriter infoStream file log is enabled: " + infoStreamFile + - "\nThis feature is deprecated. Remove @file from to output messages to solr's logfile"); - File f = new File(infoStreamFile); - File parent = f.getParentFile(); - if (parent != null) parent.mkdirs(); - try { - FileOutputStream fos = new FileOutputStream(f, true); - infoStream = new PrintStreamInfoStream(new PrintStream(fos, true, "UTF-8")); - } catch (Exception e) { - log.error("Could not create info stream for file " + infoStreamFile, e); - } + throw new IllegalArgumentException("Remove @file from to output messages to solr's logfile"); } } mergedSegmentWarmerInfo = getPluginInfo(prefix + "/mergedSegmentWarmer", solrConfig, def.mergedSegmentWarmerInfo); diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-indexconfig.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-indexconfig.xml index a26b78edbc5..834032d5adf 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-indexconfig.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-indexconfig.xml @@ -24,6 +24,6 @@ ${useCompoundFile:false} 123 - true + true diff --git a/solr/core/src/test/org/apache/solr/core/TestSolrIndexConfig.java b/solr/core/src/test/org/apache/solr/core/TestSolrIndexConfig.java index d6b00054641..e32e610feaf 100644 --- a/solr/core/src/test/org/apache/solr/core/TestSolrIndexConfig.java +++ b/solr/core/src/test/org/apache/solr/core/TestSolrIndexConfig.java @@ -18,8 +18,8 @@ package org.apache.solr.core; */ import org.apache.lucene.index.IndexWriterConfig; -import org.apache.lucene.util.PrintStreamInfoStream; import org.apache.solr.SolrTestCaseJ4; +import org.apache.solr.update.LoggingInfoStream; import org.junit.BeforeClass; public class TestSolrIndexConfig extends SolrTestCaseJ4 { @@ -33,6 +33,6 @@ public class TestSolrIndexConfig extends SolrTestCaseJ4 { IndexWriterConfig iwc = solrConfig.indexConfig.toIndexWriterConfig(h.getCore().getLatestSchema()); assertEquals(123, iwc.getMaxThreadStates()); - assertTrue(iwc.getInfoStream() instanceof PrintStreamInfoStream); + assertTrue(iwc.getInfoStream() instanceof LoggingInfoStream); } }