Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道我是否可以将我的应用程序在“生产”环境中发生的所有错误发送到新的“日志”,而不是将所有操作发送到“production.log”并将其发送到“production_errors.log”。
如果可能的话,请告诉我如何!
非常感谢您的阅读!
在config/environments/production.rb,在配置块内:
config/environments/production.rb
config.logger = Logger.new(Rails.root.join(%w(log production_errors.log)), :error)