heroku 会自动更新存储库吗?
Does heroku automatically update the repository?
我部署了一个 heroku 应用程序。在该应用程序中,每当发生某些事情时,我的程序都会将日志存储在一个文件中。但是日志没有显示在我的 github 存储库中。如何获取文件中存储的日志以及更新文件 kepp?
Heroku 的 ephemeral filesystem makes file-based logging impractical. Any changes you make to the filesystem will be lost the next time your dyno restarts. This happens frequently (at least once per day).
日志应该 simply be printed to stdout
or stderr
. Heroku will capture them and include them in its log stream, which you can view by running heroku logs
或通过仪表板。
日志流 doesn't keep very many logs, or store them for very long,但您可以使用日志记录 add-on 或根据需要实施日志排出:
Logplex is designed for collating and routing log messages, not for storage. It retains the most recent 1,500 lines of your consolidated logs, which expire after 1 week.
For more production-ready persistence of logs, add one of the Heroku platform’s available logging add-ons to your app. Most of these add-ons offer a free plan to get started.
Alternatively, implement your own log drains for full control over what happens to your logs.
我部署了一个 heroku 应用程序。在该应用程序中,每当发生某些事情时,我的程序都会将日志存储在一个文件中。但是日志没有显示在我的 github 存储库中。如何获取文件中存储的日志以及更新文件 kepp?
Heroku 的 ephemeral filesystem makes file-based logging impractical. Any changes you make to the filesystem will be lost the next time your dyno restarts. This happens frequently (at least once per day).
日志应该 simply be printed to stdout
or stderr
. Heroku will capture them and include them in its log stream, which you can view by running heroku logs
或通过仪表板。
日志流 doesn't keep very many logs, or store them for very long,但您可以使用日志记录 add-on 或根据需要实施日志排出:
Logplex is designed for collating and routing log messages, not for storage. It retains the most recent 1,500 lines of your consolidated logs, which expire after 1 week.
For more production-ready persistence of logs, add one of the Heroku platform’s available logging add-ons to your app. Most of these add-ons offer a free plan to get started.
Alternatively, implement your own log drains for full control over what happens to your logs.