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.
似乎print, puts, orlogger.info在包含的 gem 中不起作用。我想知道是否有解决方法。
print
puts
logger.info
RAILS_DEFAULT_LOGGER是一个几乎可以在任何上下文中使用的全局参考。
RAILS_DEFAULT_LOGGER
未来注意事项:RAILS_DEFAULT_LOGGER在 Rails 3.x+ 中已弃用。
现在您可以使用:
Rails.logger.debug