Heroku:如何查看 Heroku 错误日志? [英] Heroku: How can you check Heroku Error Logs?

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

问题描述

我在一个免费的 Heroku 帐户上有一个 PHP 应用程序.今天不知何故,我看到 Heroku 的应用程序错误屏幕大约一个小时.Heroku 的状态报告页面上没有停机时间.

I've got a PHP application on a free Heroku account. Today for no apparent reason I got Heroku's Application Error screen for about an hour. No downtimes on Heroku's status report page.

我想检查日志以找出应用程序关闭的原因..但不知道如何执行此操作!有人可以帮我吗?

I'd like to check the logs to figure out why the application was down.. But have no idea how to do this! Can somebody please help me?

推荐答案

只需使用 heroku logs 即可显示日志的最后 100 行.

Simply use heroku logs to display the last 100 lines of your logs.

或者实时跟踪日志:heroku 日志 -t

Heroku 仅保存最后 1500 行日志,您可以使用 heroku logs -n 1500 访问这些日志.如果您需要更多日志记录,请查看 Heroku 附加组件,例如 Logentries 或 Papertrail.

Heroku only saves the last 1500 lines of logs, which you can access using heroku logs -n 1500. If you want more logging, check out Heroku add-ons like Logentries or Papertrail.

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

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