Cover image

Sidekiq logging

6/29/2023, 3:59:00 PM

tags: ruby

How to set Sidekiq log level to debug?

Sidekiq.configure_server do |config|
  config.logger.level = Logger::DEBUG
end

What is the default log level in production environment?

The default level is INFO in production environment.

How to change log format to JSON?

Sidekiq.configure_server do |config|
  config.logger.formatter = Sidekiq::Logger::Formatters::JSON.new
end

Reference