Zia Qamar
Zia Qamar

Reputation: 1775

Where are logs for Daemons of my ruby script

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.

Upvotes: 0

Views: 310

Answers (1)

Mike Gorski
Mike Gorski

Reputation: 1228

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.

Upvotes: 1

Related Questions