ruby-on-rails - Foreman 启动和隐藏 web 进程输出

标签 ruby-on-rails logging foreman procfile

我正在使用 Foreman 来运行我的 Rails 4 应用程序,但我得到了重复的输出。 Web 显示的信息与 Log 几乎相同。

我可以运行 foreman 并隐藏 Web 输出吗?

enter image description here

我的文件:

web: bundle exec passenger start -p $PORT --max-pool-size 3
log: tail -f ./log/development.log

最佳答案

Procfile 中的条目只是要运行的命令,您可以像在命令行上一样修改它们。

因此,您可以将 Web 进程的所有标准输出重定向到 /dev/null (看起来您可能在 *nix 系统上):

web: bundle exec passenger start -p $PORT --max-pool-size 3 > /dev/null

关于ruby-on-rails - Foreman 启动和隐藏 web 进程输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29460397/

相关文章:

heroku - 在heroku docker内运行gunicorn

node.js - 如何让 Heroku 识别我的文件系统中的应用程序?

ruby-on-rails-4 - 在 Rails 4 + unicorn + foreman 中禁用 Assets 日志记录

ruby-on-rails - 仅当用户在 root_path 上时才在登录后重定向用户

css - 在利用 Assets 管道的 Rails 应用程序中,css 文件中背景图像的正确路径是什么?

java - 树莓派和 log4j

c - 如何在 xterm 中启用日志记录

ruby-on-rails - 验证用户的 API 凭证 - Rails、ActiveMerchant 和 PayPal Express Gateway

ruby-on-rails - 葡萄 : required params with grape-entity

python - python中不同级别的日志记录