DEV Community

Shinji Nakamatsu
Shinji Nakamatsu

Posted on


Set the Sidekiq log level to the Rails log level

Sidekiq's default Log Level is INFO, and its settings are indepent from Rails.

Sidekiq uses the standard Ruby Logger class for logging.

To change the Log Level in the Logger class, give a constant value for Severity using the #level= method.

Set the Sidekiq Log Level for the Logger used by Sidekiq in config/initializers/sidekiq.rb as follows:

Sidekiq.configure_server do |config|
  config.logger.level = Rails.logger.level
Enter fullscreen mode Exit fullscreen mode

See also:

Latest comments (0)

Advice For Junior Developers

Advice from a career of 15+ years for new and beginner developers just getting started on their journey.