Dear Wiki user, You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.
The following page has been changed by DarylBeattie: http://wiki.apache.org/solr/SolrJBoss The comment on the change is: Added "JBoss Logging" section and added properties-service to Solr-home. ------------------------------------------------------------------------------ === Configuring Solr Home === You can configure the Solr home directory globally via ''-Dsolr.solr.home'' in the file ''bin/run.bat''. But that is often not desired because you potentially want more than one Solr installation deployed. - ==== Solr Home via web.xml ==== + ==== Solr Home Configuration ==== You can configure the Solr home directory to use per webapp in Solr's ''web.xml'' file. Add following snippet to the web.xml: {{{ <env-entry> @@ -32, +32 @@ <env-entry-type>java.lang.String</env-entry-type> <env-entry-value>C:\Projects\solr-trunk\example\solr</env-entry-value> </env-entry> + }}} + + You can also configure it (and other Solr variables, such as the Solr-data-dir) in properties-service.xml like so: + {{{ + <mbean code="org.jboss.varia.property.SystemPropertiesService" name="jboss:type=Service,name=SystemProperties"> + <attribute name="Properties"> + solr.solr.home=C:/jboss-X/server/default/conf/solr + solr.data.dir=C:/solr/data + </attribute> + </mbean> + }}} + + ==== JBoss Logging ==== + By default JBoss uses Log4J for its logging, while the default Solr installation uses the [http://www.slf4j.org/manual.html#binding SLF4J binding] to log via the JDK1.4 logging system. In order to get Solr to log via Log4J, you must replace the slf4j-jdk*.jar binding with the slf4j-log4j*.jar binding. From that point on, logging can be configured via the log4j.xml configuration file. + + For example, this can be used to silence all the INFO messages from Solr: + {{{ + <category name="org.apache.solr"> + <priority value="WARN"/> + </category> }}} === Troubleshooting ===
