I wanted to see the contents of the log of my applications on heroku.com so that I would follow the excellent advice and have all the contents of my log. However, I am curious to know where my log file is actually like this: "log / production.log" looks empty:
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
I know that I have a complete log file, how and when:
heroku logs
everything is listed, so why doesn't log / production.log contain anything? Should I apply for a ticket with Heroku ?
Thank. Vaguely James
source
share