How can I debug a resque job in rails application? I just want to write some info in a log file from self.perform function. I have written this
system("echo sos >> /home/maruf/Desktop/log.txt")
in self.perform(). But nothing happened. What is the proper way?
Why not use the Logger
facility?
log = Logger.new 'log/resque.log'
log.debug "foo bar"
And then tail -f
your newly generated log in "#{Rails.root}/log/resque.log'
. Remember to restart your resque workers as they cache the code and won't pick up changes like the rest of your development environment!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With