heroku - 如何查看所有日志 [英] heroku - how to see all the logs

查看:149
本文介绍了heroku - 如何查看所有日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在heroku上有一个小应用程序。每当我想查看日志时,我都会转到命令行并执行

  heroku日志

这只显示我约100行。是否没有办法在heroku上查看我们的应用程序的完整日志?

解决方案

更新(感谢dawmail333):

  heroku日志-n 1500 

或者直播日志

  heroku日志-t 

Heroku日志文档



如果您需要超过几千行,您可以使用heroku的系统日志排查



或者(旧方法):

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


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?

解决方案

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 }

这篇关于heroku - 如何查看所有日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆