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 "SolrLogging" by Neil Hooey
Date Wed, 25 Apr 2012 14:28:07 GMT
Dear Wiki user,

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

The "SolrLogging" page has been changed by Neil Hooey:
http://wiki.apache.org/solr/SolrLogging?action=diff&rev1=16&rev2=17

Comment:
Fixed code formatting.

  
  Note: {orig} is your top level directory for Solr.
  
+ {{{
- # cd {orig}<<BR>>
+ # cd {orig}
- # tar xzvf apache-solr-3.5.0.tgz<<BR>>
+ # tar xzvf apache-solr-3.5.0.tgz
+ }}}
  
  2. Copy the solr.war file to a new location
  
+ {{{
- # mkdir -p /tmp/solr<<BR>>
+ # mkdir -p /tmp/solr
- # cd ./example/webapps<<BR>>
+ # cd ./example/webapps
- # cp solr.war /tmp/solr<<BR>>
+ # cp solr.war /tmp/solr
- # cd /tmp/solr<<BR>>
+ # cd /tmp/solr
- # jar xvf solr.war<<BR>>
+ # jar xvf solr.war
- # rm -f solr.war<<BR>>
+ # rm -f solr.war
+ }}}
  
  3. Remove the slf4j-jdk14-1.6.1.jar file
  
+ {{{
- # cd /tmp/solr<<BR>>
+ # cd /tmp/solr
- # rm -f ./WEB-INF/lib/slf4j-jdk14-1.6.1.jar<<BR>>
+ # rm -f ./WEB-INF/lib/slf4j-jdk14-1.6.1.jar
+ }}}
  
  4. Copy logback classic files 
  
  Get the file: http://logback.qos.ch/dist/logback-1.0.1.tar.gz
  
+ {{{
- # tar xzvf logback-1.0.1.tar.gz<<BR>>
+ # tar xzvf logback-1.0.1.tar.gz
- # cd logback-1.0.1<<BR>>
+ # cd logback-1.0.1
- # cp logback-classic-1.0.1.jar /tmp/solr/WEB-INF/lib<<BR>>
+ # cp logback-classic-1.0.1.jar /tmp/solr/WEB-INF/lib
- # cp logback-core-1.0.1.jar /tmp/solr/WEB-INF/lib<<BR>>
+ # cp logback-core-1.0.1.jar /tmp/solr/WEB-INF/lib
+ }}}
  
- Note: If you wanted to upgrade SLF4J from 1.6.1 to 1.6.4 you would do the following... <<BR>>
+ Note: If you wanted to upgrade SLF4J from 1.6.1 to 1.6.4 you would do the following...
  
- a. Get the SLF4J from http://www.slf4j.org/dist/slf4j-1.6.4.tar.gz <<BR>>
+ a. Get the SLF4J from http://www.slf4j.org/dist/slf4j-1.6.4.tar.gz
- b. Extract the tar into a temporary directory <<BR>>
+ b. Extract the tar into a temporary directory
- c. delete the old versions: <<BR>>
+ c. delete the old versions:
  
+ {{{
- # rm /tmp/solr/WEB-INF/lib/jcl-over-slf4j-1.6.1.jar<<BR>>
+ # rm /tmp/solr/WEB-INF/lib/jcl-over-slf4j-1.6.1.jar
- # rm /tmp/solr/WEB-INF/lib/log4j-over-slf4j-1.6.1.jar<<BR>>
+ # rm /tmp/solr/WEB-INF/lib/log4j-over-slf4j-1.6.1.jar
- # rm /tmp/solr/WEB-INF/lib/slf4j-api-1.6.1.jar<<BR>>
+ # rm /tmp/solr/WEB-INF/lib/slf4j-api-1.6.1.jar
+ }}}
  
- d. Copy the new ones <<BR>>
+ d. Copy the new ones
  
+ {{{
- # cp jcl-over-slf4j-1.6.4.jar /tmp/solr/WEB-INF/lib <<BR>>
+ # cp jcl-over-slf4j-1.6.4.jar /tmp/solr/WEB-INF/lib
- # cp log4j-over-slf4j-1.6.4.jar /tmp/solr/WEB-INF/lib <<BR>>
+ # cp log4j-over-slf4j-1.6.4.jar /tmp/solr/WEB-INF/lib
- # cp slf4j-api-1.6.4.jar /tmp/solr/WEB-INF/lib <<BR>>
+ # cp slf4j-api-1.6.4.jar /tmp/solr/WEB-INF/lib
+ }}}
  
  5. Rebuild the war
  
+ {{{
- # cd /tmp/solr<<BR>>
+ # cd /tmp/solr
- # jar cvf solr.war *<<BR>>
+ # jar cvf solr.war *
+ }}}
  
  6. Copy the war back to your example/webapps directory
  
+ {{{
- # cp solr.war {orig}/apache-solr-3.5.0/example/webapps<<BR>>
+ # cp solr.war {orig}/apache-solr-3.5.0/example/webapps
+ }}}
  
  7. Create resources/logback.xml file
  
+ {{{
- # cd {orig}/apache-solr-3.5.0/example<<BR>>
+ # cd {orig}/apache-solr-3.5.0/example
- # mkdir resources<<BR>>
+ # mkdir resources
+ }}}
  
  copy logback.xml into this directory.
  
@@ -100, +118 @@

  
  Example logback.xml. 
  
+ {{{
- <configuration debug="true"><<BR>>
+ <configuration debug="true">
-  <appender name="FILE" class="ch.qos.logback.core.FileAppender"><<BR>>
+  <appender name="FILE" class="ch.qos.logback.core.FileAppender">
-     <file>C:\solr\jetty\example\solr\logs\solr.log</file><<BR>>
+     <file>C:\solr\jetty\example\solr\logs\solr.log</file>
-     <encoder><<BR>>
+     <encoder>
-         <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern><<BR>>
+         <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
-     </encoder><<BR>>
+     </encoder>
-   </appender><<BR>>
+   </appender>
-   <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"><<BR>>
+   <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
-     <encoder><<BR>>
+     <encoder>
-       <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern><<BR>>
+       <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
-     </encoder><<BR>>
+     </encoder>
-   </appender><<BR>>
+   </appender>
-   <logger name="org.apache.solr.handler.dataimport.DocBuilder.level" level="SEVERE" additivity="false"><<BR>>
+   <logger name="org.apache.solr.handler.dataimport.DocBuilder.level" level="SEVERE" additivity="false">
-     <appender-ref ref="FILE" /><<BR>>
+     <appender-ref ref="FILE" />
-   </logger><<BR>>
+   </logger>
-   <logger name="org.apache.solr.handler.dataimport.ThreadedEntityProcessorWrapper.level"
level="SEVERE" additivity="false"><<BR>>
+   <logger name="org.apache.solr.handler.dataimport.ThreadedEntityProcessorWrapper.level"
level="SEVERE" additivity="false">
-     <appender-ref ref="FILE" /><<BR>>
+     <appender-ref ref="FILE" />
-   </logger><<BR>>
+   </logger>
-   <logger name="org.apache.solr.core.SolrCore" level="INFO" additivity="false"><<BR>>
+   <logger name="org.apache.solr.core.SolrCore" level="INFO" additivity="false">
- 	<appender-ref ref="FILE" /><<BR>>
+ 	<appender-ref ref="FILE" />
-   </logger><<BR>>
+   </logger>
-   <logger name="org.apache.solr" level="INFO" additivity="false"><<BR>>
+   <logger name="org.apache.solr" level="INFO" additivity="false">
-     <appender-ref ref="FILE" /><<BR>>
+     <appender-ref ref="FILE" />
-   </logger><<BR>>
+   </logger>
-   <root level="OFF"><<BR>>
+   <root level="OFF">
-     <appender-ref ref="STDOUT" /><<BR>>
+     <appender-ref ref="STDOUT" />
-   </root><<BR>>
+   </root>
- </configuration><<BR>>
+ </configuration>
+ }}}
  

Mime
View raw message