diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2019-07-10 22:26:47 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-07-10 22:26:47 +0300 |
commit | 0ab89d8e36ba58a95244b4c6dd49d53fac7a699f (patch) | |
tree | 40707956c6a5942b6301b18b2e85e5336fa590c3 /lib/gitlab/hashed_storage | |
parent | 82503745143faf2b71185c9f392dbfd00d6d587e (diff) |
Add a rubocop for Rails.logger
Suggests to use a JSON structured log instead
Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/54102
Diffstat (limited to 'lib/gitlab/hashed_storage')
-rw-r--r-- | lib/gitlab/hashed_storage/migrator.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/hashed_storage/migrator.rb b/lib/gitlab/hashed_storage/migrator.rb index 1f0deebea39..6a8e16f5a85 100644 --- a/lib/gitlab/hashed_storage/migrator.rb +++ b/lib/gitlab/hashed_storage/migrator.rb @@ -62,6 +62,7 @@ module Gitlab # Flag a project to be migrated to Hashed Storage # # @param [Project] project that will be migrated + # rubocop:disable Gitlab/RailsLogger def migrate(project) Rails.logger.info "Starting storage migration of #{project.full_path} (ID=#{project.id})..." @@ -69,10 +70,12 @@ module Gitlab rescue => err Rails.logger.error("#{err.message} migrating storage of #{project.full_path} (ID=#{project.id}), trace - #{err.backtrace}") end + # rubocop:enable Gitlab/RailsLogger # Flag a project to be rolled-back to Legacy Storage # # @param [Project] project that will be rolled-back + # rubocop:disable Gitlab/RailsLogger def rollback(project) Rails.logger.info "Starting storage rollback of #{project.full_path} (ID=#{project.id})..." @@ -80,6 +83,7 @@ module Gitlab rescue => err Rails.logger.error("#{err.message} rolling-back storage of #{project.full_path} (ID=#{project.id}), trace - #{err.backtrace}") end + # rubocop:enable Gitlab/RailsLogger # Returns whether we have any pending storage migration # |