【问题标题】:Foreman start and hide the web process outputForeman 启动和隐藏 web 进程输出
【发布时间】:2015-04-05 17:54:56
【问题描述】:

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

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

我的过程文件:

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

【问题讨论】:

    标签: ruby-on-rails logging foreman procfile


    【解决方案1】:

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

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-10-14
      • 1970-01-01
      • 1970-01-01
      • 2012-07-01
      • 2011-10-29
      • 2014-05-03
      相关资源
      最近更新 更多