运行“rails server Thin”时是否有减少冗长的方法? ?我只想查看记录器调试消息
有没有办法减少运行“rails server Thin”时看到的垃圾量?现在,我看到了所有 sql 调用和缓存调用,但我只想关注调试/记录器消息。
Is there a way to decrease the amount of cruft that you look at when you're running 'rails server thin'? Right now, I see all the sql calls and cache calls, but I just want to focus on the debug/logger messages.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以重新配置 ActiveRecord 记录器。编辑development.rb并添加以下行:
You can reconfigure the ActiveRecord logger. Edit development.rb and add the following line:
如果您在 YAML 中对开发和生产有相同的设置,请尝试使用以下参数启动此服务器:
If you have same settings in YAML for both development and Production, Try starting the this server with these parameters:
我发现 Ryan Bates 修订后的railscast“The Logger”非常有用。
这涵盖了 quiet_assets gem,它会删除与资产相关的日志。
I found Ryan Bates' revised railscast "The Logger" incredibly helpful.
This covers the quiet_assets gem, which removes asset-related logs.