0

I have demamonized my ruby script like this

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

basically i am using gem https://github.com/thuehlinger/daemons.

And i have used puts statements in my ruby code. So i was wondering where exactly i can find logs for my ruby script. Where is the output of puts statements.

Not much familiar with Daemons.

1 Answer 1

1

If you pass in an options hash as the second argument to the Daemons.run command you can add :log_output as true. Like this:

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

This will send output to a file titled meeting_receiver.output.

See this example more details.

2
  • I tried above coed, and it is working. But it did not log output all the times on production.
    – Zia Qamar
    Oct 23, 2018 at 6:51
  • What was missing from production? Oct 24, 2018 at 12:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.