I'd like to use the DEBUG
logging level for my Rails app on our staging server, but I'd like delayed_job
(which logs a SELECT
statement to the main Rails log every 10 seconds) to log at INFO
level, so I don't get these delayed_job
SELECT
statements in there.
Is this possible?
RAILS_DEFAULT_LOGGER
is deprecated in 3.x versions of Rails, so you'll need to use the following in script/delayed_job before the Delayed::Command.new(ARGV).daemonize
call:
::Rails.logger.level = Logger::INFO
I just ran into this. What I did in my script that runs Delayed::Job.worker.start was to add, before the worker starts:
RAILS_DEFAULT_LOGGER.level = Logger::INFO
This worked for me.
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