lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Solr Wiki] Update of "SolrJetty" by Chris Adams
Date Tue, 19 Feb 2013 16:21:14 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "SolrJetty" page has been changed by Chris Adams:
http://wiki.apache.org/solr/SolrJetty?action=diff&rev1=31&rev2=32

Comment:
Added instructions for using Jetty's built-in log rotation feature

  === log4j ===
  You can also use [[http://globalgateway.wordpress.com/2010/01/06/configuring-solr-1-4-logging-with-log4j-in-tomcat/|log4j
recipe]] to handle logs. But it probably add new log handler instead replacing current. After
reconfiguration please recheck result carefully.
  
- === logrotating ===
+ === Log rotation ===
- TODO.
+ 
+ Jetty now has built-in support for log rotation. Add something like this to your jetty.xml
file inside the {{{<Configure id="Server" class="org.mortbay.jetty.Server">}}} tag:
+ 
+ {{{
+     <New id="ServerLog" class="java.io.PrintStream">
+         <Arg>
+             <New class="org.mortbay.util.RolloverFileOutputStream">
+                 <Arg><SystemProperty name="jetty.logs" default="./logs/"/>yyyy_mm_dd.jetty.log</Arg>
+                 <Arg type="boolean">false</Arg>
+                 <Arg type="int">90</Arg>
+                 <Arg><Call class="java.util.TimeZone" name="getTimeZone"><Arg>GMT</Arg></Call></Arg>
+                 <Get id="ServerLogName" name="datedFilename"/>
+             </New>
+         </Arg>
+     </New>
+     <Call class="java.lang.System" name="setErr"><Arg><Ref id="ServerLog"/></Arg></Call>
+     <Call class="java.lang.System" name="setOut"><Arg><Ref id="ServerLog"/></Arg></Call>
+ }}}
  
  == Other information ==
  === Configuring Solr Home with JNDI (Jetty < 6.0) (Deprecated) ===
@@ -310, +327 @@

   </Configure>
  
   2. Copy solr.war to [jetty.home]/webapps. Manually unzip it there, you will have [jetty.home]/webapps/solr.
Copy the conf folder (from the example folder that you download solr) to [jetty.home]/webapps/solr.
Change all the config that you need in schema.xml and solrconfig.xml
- This step is just for me to test, if you point your /solr/home to another folder, and copy
conf folder to that folder, for example 
+ This step is just for me to test, if you point your /solr/home to another folder, and copy
conf folder to that folder, for example
  <Arg type="java.lang.String">/opt/solr/</Arg>, then copy conf to /opt/solr/conf.
Then copy solr.war to webapps folder, don't need to unzip.
  
   3. under [jetty.home], start jetty in command line: java -jar start.jar OPTIONS=plus

Mime
View raw message