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.
我正在使用 Heroku + RedisToGo + Resque。我有一个工人正在运行一个无休止的任务。我想记录它的活动。heroku logs --tail不显示有关工人活动的任何信息。我怎样才能做到这一点?谢谢!
heroku logs --tail
Heroku 记录任何写入标准输出或标准错误的内容。所以一个简单的puts语句应该可以解决问题。
puts
尝试Rails.logger.info("I am done doing stuff!")在 Resque 工作人员的#perform方法中添加类似的内容。
Rails.logger.info("I am done doing stuff!")
#perform