You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2013/07/02 16:02:04 UTC
svn commit: r1498944 - in /lucene/dev/branches/branch_4x: ./ solr/
solr/core/ solr/core/src/java/org/apache/solr/update/
solr/core/src/test-files/solr/collection1/conf/
solr/core/src/test/org/apache/solr/core/ solr/example/
solr/example/alt-configs/hdf...
Author: rmuir
Date: Tue Jul 2 14:02:04 2013
New Revision: 1498944
URL: http://svn.apache.org/r1498944
Log:
SOLR-4977: Add option to send infostream to the logging system
Added:
lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/update/LoggingInfoStream.java
- copied unchanged from r1498936, lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/LoggingInfoStream.java
lucene/dev/branches/branch_4x/solr/core/src/test-files/solr/collection1/conf/solrconfig-infostream-logging.xml
- copied unchanged from r1498936, lucene/dev/trunk/solr/core/src/test-files/solr/collection1/conf/solrconfig-infostream-logging.xml
lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/core/TestInfoStreamLogging.java
- copied unchanged from r1498936, lucene/dev/trunk/solr/core/src/test/org/apache/solr/core/TestInfoStreamLogging.java
Modified:
lucene/dev/branches/branch_4x/ (props changed)
lucene/dev/branches/branch_4x/solr/ (props changed)
lucene/dev/branches/branch_4x/solr/CHANGES.txt (contents, props changed)
lucene/dev/branches/branch_4x/solr/core/ (props changed)
lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/update/SolrIndexConfig.java
lucene/dev/branches/branch_4x/solr/example/ (props changed)
lucene/dev/branches/branch_4x/solr/example/alt-configs/hdfs/solrconfig.xml
lucene/dev/branches/branch_4x/solr/example/resources/log4j.properties
lucene/dev/branches/branch_4x/solr/example/solr/collection1/conf/solrconfig.xml
Modified: lucene/dev/branches/branch_4x/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/CHANGES.txt?rev=1498944&r1=1498943&r2=1498944&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/CHANGES.txt (original)
+++ lucene/dev/branches/branch_4x/solr/CHANGES.txt Tue Jul 2 14:02:04 2013
@@ -119,6 +119,9 @@ New Features
* SOLR-4655: Add option to have Overseer assign generic node names so that
new addresses can host shards without naming confusion. (Mark Miller, Anshum Gupta)
+* SOLR-4977: Add option to send IndexWriter's infostream to the logging system.
+ (Ryan Ernst via Robert Muir)
+
Bug Fixes
----------------------
Modified: lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/update/SolrIndexConfig.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/update/SolrIndexConfig.java?rev=1498944&r1=1498943&r2=1498944&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/update/SolrIndexConfig.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/update/SolrIndexConfig.java Tue Jul 2 14:02:04 2013
@@ -153,8 +153,12 @@ public class SolrIndexConfig {
boolean infoStreamEnabled = solrConfig.getBool(prefix + "/infoStream", false);
if(infoStreamEnabled) {
String infoStreamFile = solrConfig.get(prefix + "/infoStream/@file", null);
- if (infoStreamFile != null) {
- log.info("IndexWriter infoStream debug log is enabled: " + infoStreamFile);
+ if (infoStreamFile == null) {
+ 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();
Modified: lucene/dev/branches/branch_4x/solr/example/alt-configs/hdfs/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/example/alt-configs/hdfs/solrconfig.xml?rev=1498944&r1=1498943&r2=1498944&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/example/alt-configs/hdfs/solrconfig.xml (original)
+++ lucene/dev/branches/branch_4x/solr/example/alt-configs/hdfs/solrconfig.xml Tue Jul 2 14:02:04 2013
@@ -298,10 +298,10 @@
To aid in advanced debugging, Lucene provides an "InfoStream"
of detailed information when indexing.
- Setting The value to true will instruct the underlying Lucene
- IndexWriter to write its debugging info the specified file
+ Setting the value to true will instruct the underlying Lucene
+ IndexWriter to write its info stream to solr's log.
-->
- <!-- <infoStream file="INFOSTREAM.txt">false</infoStream> -->
+ <!-- <infoStream>false</infoStream> -->
</indexConfig>
Modified: lucene/dev/branches/branch_4x/solr/example/resources/log4j.properties
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/example/resources/log4j.properties?rev=1498944&r1=1498943&r2=1498944&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/example/resources/log4j.properties (original)
+++ lucene/dev/branches/branch_4x/solr/example/resources/log4j.properties Tue Jul 2 14:02:04 2013
@@ -19,3 +19,6 @@ log4j.appender.file.layout.ConversionPat
log4j.logger.org.apache.zookeeper=WARN
log4j.logger.org.apache.hadoop=WARN
+
+# set to INFO to enable infostream log messages
+log4j.logger.org.apache.solr.update.LoggingInfoStream=OFF
Modified: lucene/dev/branches/branch_4x/solr/example/solr/collection1/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/example/solr/collection1/conf/solrconfig.xml?rev=1498944&r1=1498943&r2=1498944&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/example/solr/collection1/conf/solrconfig.xml (original)
+++ lucene/dev/branches/branch_4x/solr/example/solr/collection1/conf/solrconfig.xml Tue Jul 2 14:02:04 2013
@@ -304,10 +304,11 @@
To aid in advanced debugging, Lucene provides an "InfoStream"
of detailed information when indexing.
- Setting The value to true will instruct the underlying Lucene
- IndexWriter to write its debugging info the specified file
+ Setting the value to true will instruct the underlying Lucene
+ IndexWriter to write its info stream to solr's log. By default,
+ this is enabled here, and controlled through log4j.properties.
-->
- <!-- <infoStream file="INFOSTREAM.txt">false</infoStream> -->
+ <infoStream>true</infoStream>
</indexConfig>