开发者

Apache Solr Client = How to enable "wire" logging (with log4j)

开发者 https://www.devze.com 2023-03-10 06:27 出处:网络
I would be very thankfull, if someone can tell me, how to enable \"wire logging\" (printing all the XML that is sent and received from the solr-java-client to/from the solr-server).

I would be very thankfull, if someone can tell me, how to enable "wire logging" (printing all the XML that is sent and received from the solr-java-client to/from the solr-server).

The Client i use: http://wiki.apache.org/solr/SolJava I use log4j!!

Both did NOT work in log4j config:

<开发者_高级运维logger name="org.apache.solr" additivity="false">     
    <level value="debug" />
    <appender-ref ref="RollingFileAppender" />
    <appender-ref ref="ConsoleAppender" />  
  </logger>


<logger name="org.apache.commons.httpclient" additivity="false">     
    <level value="debug" /> 
    <appender-ref ref="RollingFileAppender" />
    <appender-ref ref="ConsoleAppender" />  
  </logger>

Solr internally uses another logging framework slf??? ,maybe this is the reason, but I do not know where to start here how to solve the problem.

Thanks!!! Jens


Solr makes use of the JDK Logging since Version 1.4.

Maybe this tutorial will help you figure out how to configure your Tomcat for that.

Or replace the slfj api within the solr.war file with the one for log4j as mentioned in the Solr documentation.

If you want to have more information within the client look at the SolrQuery javadoc.

Hope this helps you a step forward.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号