Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

logging - heroku - how to see all the logs

I have a small app on heroku. Whenever I want to see the logs I go to the command line and do

heroku logs

That only shows me about 100 lines. Is there not a way to see complete logs for our application on heroku?

Question&Answers:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Update (thanks to dawmail333):

heroku logs -n 1500

or, to tail the logs live

heroku logs -t 

Heroku log documentation

If you need more than a few thousand lines you can Use heroku's Syslog Drains

Alternatively (old method):

$ heroku run rails c
File.open('log/production.log', 'r').each_line { |line| puts line }

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...