From aad2e06f4851f9236881897bf987950b772dd99a Mon Sep 17 00:00:00 2001 From: Zeger-Jan van de Weg Date: Mon, 14 May 2018 15:08:51 +0200 Subject: More verbose logging for deprecated path access Current logging tells us we've isolated the calls to about 5 call sites, now we'd like to know what is calling these methods. --- config/initializers/deprecations.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/initializers/deprecations.rb b/config/initializers/deprecations.rb index 2476ea9e38a..c8d7f742bb1 100644 --- a/config/initializers/deprecations.rb +++ b/config/initializers/deprecations.rb @@ -1,5 +1,9 @@ -deprecator = ActiveSupport::Deprecation.new('11.0', 'GitLab') - if Gitlab.dev_env_or_com? + 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 -- cgit v1.2.1