I would like to use the DEBUG reference level for my Rails application on our intermediate server, but I would like delayed_job (which logs the SELECT in the Rails main log every 10 seconds) to log at the INFO level, so I don't get these delayed_job SELECT .
DEBUG
delayed_job
SELECT
INFO
Is it possible?
I just ran into this. What I did in my script that runs Delayed :: Job.worker.start had to add before the worker starts:
RAILS_DEFAULT_LOGGER.level = Logger::INFO
It worked for me.
RAILS_DEFAULT_LOGGER deprecated in Rails versions 3.x, so before calling Delayed::Command.new(ARGV).daemonize you need to use the following in script / delayed_job:
RAILS_DEFAULT_LOGGER
Delayed::Command.new(ARGV).daemonize
::Rails.logger.level = Logger::INFO