Sidekiq logger output not redirected in tests
Noticed while reviewing https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14067/diffs#note_41460170 If a sidekiq worker calls `logger.error` or `Sidekiq.logger.error`, then the output goes to STDOUT in the specs. `Rails.logger.error`, by contrast, goes to `log/test.log` Presumably as a result of this, many of our sidekiq workers use `Rails.logger` instead of `logger`, leading to log output in an unexpected place. We should fix the test suite so `Sidekiq.logger` goes to a file in specs, and change all our workers to use `logger` instead of `Rails.logger`.
issue