代码之家  ›  专栏  ›  技术社区  ›  Zia Qamar

我的ruby脚本的守护进程日志在哪里

  •  0
  • Zia Qamar  · 技术社区  · 8 年前

    Daemons.run('script/meeting_receiver.rb')
    

    基本上我用的是宝石 https://github.com/thuehlinger/daemons

    我在ruby代码中使用了puts语句。所以我想知道在哪里可以找到我的ruby脚本的日志。其中是puts语句的输出。

    不太熟悉守护进程。

    1 回复  |  直到 8 年前
        1
  •  1
  •   Mike Gorski    8 年前

    Daemons.run 可以添加的命令 :log_output 是真的。这样地:

    Daemons.run('script/meeting_receiver.rb', log_output: true)
    

    meeting_receiver.output .

    看到了吗 this example 更多细节。

    推荐文章