diff options
Diffstat (limited to 'config/initializers/deprecations.rb')
-rw-r--r-- | config/initializers/deprecations.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/config/initializers/deprecations.rb b/config/initializers/deprecations.rb new file mode 100644 index 00000000000..14616e726d9 --- /dev/null +++ b/config/initializers/deprecations.rb @@ -0,0 +1,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}") + } + + ActiveSupport::Deprecation.deprecate_methods(Gitlab::GitalyClient::StorageSettings, :legacy_disk_path, deprecator: deprecator) +end |