From 6bfef3883bbe09d04e39fba88af82c8b8d787b0b Mon Sep 17 00:00:00 2001 From: Fabio Napoleoni Date: Thu, 3 Jul 2025 15:54:38 +0200 Subject: [PATCH] Update defaults.rb Fix Sidekiq.logger reference by fully qualifying it. --- lib/rails_semantic_logger/sidekiq/defaults.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rails_semantic_logger/sidekiq/defaults.rb b/lib/rails_semantic_logger/sidekiq/defaults.rb index ce529c4..3dafc0b 100644 --- a/lib/rails_semantic_logger/sidekiq/defaults.rb +++ b/lib/rails_semantic_logger/sidekiq/defaults.rb @@ -9,7 +9,7 @@ module Defaults unless ctx.empty? job_hash = ctx[:job] || {} klass = job_hash["display_class"] || job_hash["wrapped"] || job_hash["class"] - logger = klass ? SemanticLogger[klass] : Sidekiq.logger + logger = klass ? SemanticLogger[klass] : ::Sidekiq.logger ctx[:context] ? logger.warn(ctx[:context], ctx) : logger.warn(ctx) end end @@ -18,7 +18,7 @@ module Defaults unless ctx.empty? job_hash = ctx[:job] || {} klass = job_hash["display_class"] || job_hash["wrapped"] || job_hash["class"] - logger = klass ? SemanticLogger[klass] : Sidekiq.logger + logger = klass ? SemanticLogger[klass] : ::Sidekiq.logger ctx[:context] ? logger.warn(ctx[:context], ctx) : logger.warn(ctx) end end