lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwe...@apache.org
Subject svn commit: r1596188 - in /lucene/dev/branches/lucene5650/solr/contrib/velocity/src: java/org/apache/solr/response/VelocityResponseWriter.java test/org/apache/solr/velocity/VelocityResponseWriterTest.java
Date Tue, 20 May 2014 10:46:36 GMT
Author: dweiss
Date: Tue May 20 10:46:35 2014
New Revision: 1596188

URL: http://svn.apache.org/r1596188
Log:
Don't create a separate velocity log file by default (it will get propagated to normal log4j
loggers/ appenders pipeline.

Modified:
    lucene/dev/branches/lucene5650/solr/contrib/velocity/src/java/org/apache/solr/response/VelocityResponseWriter.java
    lucene/dev/branches/lucene5650/solr/contrib/velocity/src/test/org/apache/solr/velocity/VelocityResponseWriterTest.java

Modified: lucene/dev/branches/lucene5650/solr/contrib/velocity/src/java/org/apache/solr/response/VelocityResponseWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5650/solr/contrib/velocity/src/java/org/apache/solr/response/VelocityResponseWriter.java?rev=1596188&r1=1596187&r2=1596188&view=diff
==============================================================================
--- lucene/dev/branches/lucene5650/solr/contrib/velocity/src/java/org/apache/solr/response/VelocityResponseWriter.java
(original)
+++ lucene/dev/branches/lucene5650/solr/contrib/velocity/src/java/org/apache/solr/response/VelocityResponseWriter.java
Tue May 20 10:46:35 2014
@@ -133,13 +133,16 @@ public class VelocityResponseWriter impl
     // TODO: Externalize Velocity properties
     String propFile = request.getParams().get("v.properties");
     try {
-      if (propFile == null)
-        engine.init();
-      else {
+      Properties props = new Properties();
+      // Don't create a separate velocity log file by default.
+      props.put(RuntimeConstants.RUNTIME_LOG, "");
+
+      if (propFile == null) {
+        engine.init(props);
+      } else {
         InputStream is = null;
         try {
           is = resourceLoader.getResourceStream(propFile);
-          Properties props = new Properties();
           props.load(new InputStreamReader(is, StandardCharsets.UTF_8));
           engine.init(props);
         }

Modified: lucene/dev/branches/lucene5650/solr/contrib/velocity/src/test/org/apache/solr/velocity/VelocityResponseWriterTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5650/solr/contrib/velocity/src/test/org/apache/solr/velocity/VelocityResponseWriterTest.java?rev=1596188&r1=1596187&r2=1596188&view=diff
==============================================================================
--- lucene/dev/branches/lucene5650/solr/contrib/velocity/src/test/org/apache/solr/velocity/VelocityResponseWriterTest.java
(original)
+++ lucene/dev/branches/lucene5650/solr/contrib/velocity/src/test/org/apache/solr/velocity/VelocityResponseWriterTest.java
Tue May 20 10:46:35 2014
@@ -22,12 +22,10 @@ import org.apache.solr.response.QueryRes
 import org.apache.solr.response.SolrQueryResponse;
 import org.apache.solr.response.VelocityResponseWriter;
 import org.apache.solr.request.SolrQueryRequest;
-import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
 import java.io.StringWriter;
-import java.io.IOException;
 
 public class VelocityResponseWriterTest extends SolrTestCaseJ4 {
   @BeforeClass



Mime
View raw message