记录器问题 - Rails Heroku / Dev 中的 Foreman
我似乎有一个非常奇怪的问题......我正在尝试开发一个要使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这不是福尔曼做的事。
如果你只看 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?