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 AndreyNiakhaichyk
Date Tue, 13 Dec 2011 10:31:55 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 AndreyNiakhaichyk:
http://wiki.apache.org/solr/SolrJetty?action=diff&rev1=28&rev2=29

Comment:
Improve logging part

   * How to specify `plusConfig` inside context configuration.
   * How to specify solr.home for particular context inside context configuration.
  
+ == Logging ==
+ By default Solr producing huge log output. Solr uses JDK log functionality. You can control
the amount of logging output in Solr by using the Admin Web interface. Select the LOGGING
link. Note that this page only lets you change settings in the running system and is not saved
for the next run.
+ To setup default Log level we have to create file with logging properties logging.properties.
+ 
+ {{{
+ org.apache.solr.level = WARNING
+ 
+ handlers = java.util.logging.FileHandler
+ java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
+ java.util.logging.FileHandler.pattern = /var/log/jetty6/solr-%u.log
+ }}}
+ 
+ and add it into Jetty java options (/etc/default/jetty):
+ {{{
+ JAVA_OPTIONS="-Djava.util.logging.config.file=etc/logging.properties $JAVA_OPTIONS"
+ }}}
+ and restart jetty.
+ 
+ NOTE!!! This logging.properties file contains not only new log level but new file for logs.
It has been defined because JDK may stop log to standard output after defining -Djava.util.logging.config.file
property.
+ 
+ === 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 ===
+ TODO.
+ 
+ 
  == Other information ==
- === Logging ===
- To switch Solr log level from INFO to WARNING you have to [[http://lucidworks.lucidimagination.com/display/solr/Configuring+Logging|create
logging.properties file and reconfigure JVM]].
- 
- For information about controlling JDK Logging (aka: java.util logging) in Jetty please consult
the Jetty docs...  http://docs.codehaus.org/display/JETTY/Server+Log
- 
  === Configuring Solr Home with JNDI (Jetty < 6.0) (Deprecated) ===
  Jetty Plus provides an addEnvEntry for configuring the JNDI property needed to specify your
Solr Home directory.
  

Mime
View raw message