From 4fe685c92020f21ab7853dd937b0d2b215667d09 Mon Sep 17 00:00:00 2001 From: Joel Sugarman Date: Tue, 24 Oct 2023 13:10:51 +0100 Subject: [PATCH] Prevent sidekiq info log output during test run Dont't want to clutter up rspec and other test output with information log entries as below. ```sh ......2023-10-24T11:22:09.788Z pid=43543 tid=rhf INFO: Sidekiq 7.1.6 connecting to Redis with options {:size=>10, :pool_name=>"internal", :url=>"redis://localhost:6379"} ``` --- config/initializers/sidekiq.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb index e68b133950..f3e0841676 100644 --- a/config/initializers/sidekiq.rb +++ b/config/initializers/sidekiq.rb @@ -9,6 +9,7 @@ module Dashboard; end Sidekiq.configure_client do |config| config.redis = { url: redis_url } + config.logger.level = Logger::WARN if Rails.env.test? # accepts :expiration (optional) Sidekiq::Status.configure_client_middleware config, expiration: 30.minutes.to_i