如何从Sunspot Solr Rubygem旋转,覆盖或关闭日志记录? [英] How to rotate, override, or turn off logging from Sunspot Solr Rubygem?

查看:74
本文介绍了如何从Sunspot Solr Rubygem旋转,覆盖或关闭日志记录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Sunspot Solr搜索Ruby on Rails方面经历了丰富的经验,但是,其日志文件越来越大,我似乎无法找到旋转覆盖,或关闭这些日志(而不是采用我不愿采用的非常骇人的方法).

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 rotate, override, or turn off these logs (other than with very hacky methods that I'd rather not pursue).

我在 config/中有一个文件 sunspot.yml ,在该文件中,我尝试将 log_level 标志设置为 SEVERE strong>,但是,这没有效果.

I have a file, sunspot.yml in config/, where I tried setting the log_level flags to SEVERE, however, this had no effect.

我尝试使用标准的 Logger.config 轮换方法,但这只是将我的开发日志输出发送到了新创建的文件中.

I tried using the standard Logger.config rotation methods, however, that just sent my development log output to newly created files.

非常感谢您提供的任何建议.

I would greatly appreciate any suggestions you can offer.

推荐答案

有点晚了,但是看起来现在已经在config/sunspot.yml中处理了

It's a bit late, but looks like this is now handled inside config/sunspot.yml:

production:
  solr:
    hostname: thorn
    port: 8983
    log_level: WARNING
    min_memory: 512M
    max_memory: 1G
    solr_home: /u/solr

这篇关于如何从Sunspot Solr Rubygem旋转,覆盖或关闭日志记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆