I have a ruby application (not Rails) using Resque. I'd like to know what's going on in one of the worker I have.
To do that, I use the Logger class as stated in the officiel documentation.
Below is how I log inside a worker:
require 'resque'
require 'logger'
<code>
Resque.logger = Logger.new File.new('logfile.log', 'a')
Resque.logger.info "Whatever"
However, when running my worker, nothing is actually being logged. It's as if the worker is actually ignoring all those log instructions. No error is raised. The other pieces of code actually work - only the logging part is ignored.
I tried to use the logger class itself (ie logger = Logger.new
) but the result is the same.
Do you have any idea on how I can actually log something inside my resque worker?
Thanks!