SOLR-4977: remove deprecated option

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1498956 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2013-07-02 14:36:44 +00:00
parent 0a2107b5d7
commit 28b372ad47
4 changed files with 6 additions and 15 deletions

View File

@ -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
----------------------

View File

@ -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 <infoStream> 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 <infoStream> to output messages to solr's logfile");
}
}
mergedSegmentWarmerInfo = getPluginInfo(prefix + "/mergedSegmentWarmer", solrConfig, def.mergedSegmentWarmerInfo);

View File

@ -24,6 +24,6 @@
<indexConfig>
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
<maxIndexingThreads>123</maxIndexingThreads>
<infoStream file="infostream.txt">true</infoStream>
<infoStream>true</infoStream>
</indexConfig>
</config>

View File

@ -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);
}
}