【发布时间】:2011-10-12 04:14:03
【问题描述】:
我想在 heroku.com 上查看我的应用程序日志的内容,所以我关注了 this excellent advice 并获得了我的所有日志内容。但是我现在很想知道我的日志文件实际上在哪里,因为“log/production.log”似乎是空的:
C:\>heroku console
Ruby console for ajpbrevx.heroku.com
>> files = Dir.glob("*")
=> ["public", "tmp", "spec", "Rakefile", "doc", "config.ru", "app", "config", "lib", "README", "Gemfile.lock", "vendor", "script", "Gemfile", "log"]
>> files = Dir.glob("log/*")
=> ["log/production.log"]
>> log_file = File.open("log/production.log", "r")
=> #<File:log/production.log>
>> log_file.each_line { |line| puts line }
=> #<File:log/production.log>
>> log_file.lstat.size
=> 0
我知道我有一个完整的日志文件:
heroku logs
所有内容都列出了,那么为什么 log/production.log 不包含任何内容?我应该向Heroku 提交票证吗?
谢谢。 你的困惑, 詹姆斯
【问题讨论】: