How to rotate, override, or turn off logging from Sunspot Solr Rubygem?

前端 未结 5 688
予麋鹿
予麋鹿 2021-02-06 10:48

I\'ve had great experiences with Sunspot Solr search for Ruby on Rails, however, its log files are growing incredibly large and I can\'t seem to find a way to either rot

5条回答
  •  粉色の甜心
    2021-02-06 11:26

    You're looking for the Solr logging.properties file to customize the Java container's logging behavior. Sunspot uses Jetty for its embedded Solr instance. The Solr wiki provides instructions for customizing logging.properties in Jetty at http://wiki.apache.org/solr/LoggingInDefaultJettySetup.

    You may need to review the source code for Sunspot's rake tasks to determine the best place to inject your own logging.properties. I imagine this would be an interesting question to raise on the Sunspot mailing list for a potential patch to Sunspot.

提交回复
热议问题