I'm running Sidekiq with Rails 5.2.3 on AWS Elastic Beanstalk. Following the instructions in the Sidekiq wiki in initializers/sidekiq.rb
I've set:
Sidekiq.configure_server do |config|
config.logger.level = Logger::WARN
end
This works in the development environment however in production Sidekiq is still generating logs at the debug level. The Rails production logger level is set to config.log_level = :warn
I had a similar, but opposite problem. My production log level was set to WARN
, my Sidekiq log level was set to INFO
, but I kept getting only WARN
logs in production.
I finally figured out you must manually override the other loggers with Sidekiq.Logging
Sidekiq.configure_server do |config|
config.logger.level = Logger::WARN
Rails.logger = Sidekiq.logger
ActiveRecord::Base.logger = Sidekiq.logger
ActiveJob::Base.logger = Sidekiq.logger
end
Credit to: https://github.com/mperham/sidekiq/issues/3651
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