summaryrefslogtreecommitdiff
path: root/config/initializers/deprecations.rb
blob: 0d096e34eb7706ad74dd45b6b74fc09414f2f881 (plain)
1
2
3
4
5
6
7
8
9
if Rails.env.development? || ENV['GITLAB_LEGACY_PATH_LOG_MESSAGE']
  deprecator = ActiveSupport::Deprecation.new('11.0', 'GitLab')

  deprecator.behavior = -> (message, callstack) {
    Rails.logger.warn("#{message}: #{callstack[1..20].join}") # rubocop:disable Gitlab/RailsLogger
  }

  ActiveSupport::Deprecation.deprecate_methods(Gitlab::GitalyClient::StorageSettings, :legacy_disk_path, deprecator: deprecator)
end