Closed Petercopter closed 2 years ago
Since you are using Sidekiq 7, can you find out how to replace its default logger if it is no longer Sidekiq.logger=
?
Until we have more info on how to support Sidekiq 7, this commit will turn off built-in logging support for Sidekiq v7, allowing it to be setup manually: https://github.com/reidmorrison/rails_semantic_logger/commit/a64c48009f837ca875a451206e647ccba94cd0dd
To hazard a guess after pointing to the Rails Semantic Logger master branch, then something like the following would work:
Sidekiq.configure_{client,server,embed} do |config|
config.logger = SemanticLogger[Sidekiq]
end
Confirmed 👍 . Switching to that commit for rails_semantic_logger
and adding
Sidekiq.configure_client do |config|
config.logger = SemanticLogger[Sidekiq]
end
Sidekiq.configure_server do |config|
config.logger = SemanticLogger[Sidekiq]
end
to config/initializers/sidekiq.rb
did the trick.
Looks like there's a problem with the new Sidekiq 7 logging:
Environment
Ruby 3.1.2 Rails 7.0.4 Puma 5.6.5 rspec-rails 6.0.1 Sidekiq 7.0
config/initializers/semantic_logger.rb:
Expected Behavior
Test suite should run without errors
Actual Behavior
Edit: Mike Perham has commented on the linked issue about what is needed to support Sidekiq 7.