I can\'t get any log output from delayed_job
, and I\'m not sure my jobs are starting.
Here\'s my Procfile:
web: bundle exec rails se
When I needed log output from Delayed Jobs, I found this question to be fairly helpful.
In config/initializers/delayed_job.rb
I add the line:
Delayed::Worker.logger = Logger.new(File.join(Rails.root, 'log', 'dj.log'))
Then, in my job, I output to this log with:
Delayed::Worker.logger.info("Log Entry")
This results in the file log/dj.log
being written to. This works in development, staging, and production environments.