记录器问题 - Rails Heroku / Dev 中的 Foreman

发布于 2025-01-07 18:41:57 字数 1483 浏览 1 评论 0原文

我似乎有一个非常奇怪的问题......我正在尝试开发一个要使用 Unicorn 部署在 Heroku 上的 Rails 应用程序 - 因此我在本地开发环境中使用 Foreman 来尝试尽可能接近地复制生产。

正如您所期望的,我的 web/worker 将输出处理到 path/to/app/log 中的development.log 文件。如果我导航到该文件,它包含您期望的所有内容

但是如果我使用该命令

tail -f log/development.log

(从应用程序路径),我会从HEROKU获得日志输出!这怎么可能? (例如):

app[web.1]: [Worker(host:xxxx-xxx-xxx pid:5)] Starting job worker
heroku[web.1]: Idling
heroku[web.1]: Stopping process with SIGTERM
app[web.1]: I, [2012-02-19xxx-xxx-xxx #1]  INFO -- : reaped #<Process::Status: pid 7 exit 0> worker=0
app[web.1]: I, [2012-02-19xxx-xxx-xxx #1]  INFO -- : reaped #<Process::Status: pid 11 exit 0> worker=1
app[web.1]: I, [2012-02-19xxx-xxx-xxx #1]  INFO -- : reaped #<Process::Status: pid 14 exit 0> worker=2
app[web.1]: I, [2012-02-19xxx-xxx-xxx #1]  INFO -- : master complete
heroku[web.1]: Process exited with status 0
heroku[web.1]: State changed from up to down
heroku[slugc]: Slug compilation started
heroku[api]: Release v22 created by [email protected]
heroku[api]: Deploy xxxx by [email protected]
heroku[slugc]: Slug compilation finished

这真的很烦人,因为我无法正确查看我的开发日志...我们将不胜感激!

I seem to have a very odd issue.... I am trying to develop a Rails app to be deployed on Heroku using Unicorn - as such I'm using Foreman in my local development environment to try to replicate production as closely as possible.

As you'd expect, my web/worker processes output to the development.log file in path/to/app/log. If I navigate to the file, it contains everything you would expect.

However if I use the command

tail -f log/development.log

(from the app path), I get log output from HEROKU!! How is this possible? (e.g.):

app[web.1]: [Worker(host:xxxx-xxx-xxx pid:5)] Starting job worker
heroku[web.1]: Idling
heroku[web.1]: Stopping process with SIGTERM
app[web.1]: I, [2012-02-19xxx-xxx-xxx #1]  INFO -- : reaped #<Process::Status: pid 7 exit 0> worker=0
app[web.1]: I, [2012-02-19xxx-xxx-xxx #1]  INFO -- : reaped #<Process::Status: pid 11 exit 0> worker=1
app[web.1]: I, [2012-02-19xxx-xxx-xxx #1]  INFO -- : reaped #<Process::Status: pid 14 exit 0> worker=2
app[web.1]: I, [2012-02-19xxx-xxx-xxx #1]  INFO -- : master complete
heroku[web.1]: Process exited with status 0
heroku[web.1]: State changed from up to down
heroku[slugc]: Slug compilation started
heroku[api]: Release v22 created by [email protected]
heroku[api]: Deploy xxxx by [email protected]
heroku[slugc]: Slug compilation finished

This is really annoying as I can't properly see my development log... help would be appreciated!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

半山落雨半山空 2025-01-14 18:41:57

这不是福尔曼做的事。

如果你只看 log/development.log 会发生什么?是一样的吗?

您是否有任何奇怪的别名设置可能导致此问题?

This isn't something that Foreman's doing.

What happens if you just look at log/development.log? Is it the same?

Do you have any wacky aliases setup that might be causing this?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文