Where are logs for Daemons of my ruby script

303 Views Asked by At

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

There are 1 best solutions below

2
On BEST ANSWER

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.