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.

Sergio Tulentsev
  • 226,338
  • 43
  • 373
  • 367
Zia Qamar
  • 1,694
  • 1
  • 15
  • 35

1 Answers1

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.

Mike Gorski
  • 1,228
  • 1
  • 8
  • 13