summaryrefslogtreecommitdiff
path: root/lib/chef/dsl/recipe.rb
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2015-08-31 14:38:50 -0700
committerJohn Keiser <john@johnkeiser.com>2015-09-01 19:30:43 -0700
commit25dac92eeb1ffa83ec549bfed0b19672c5847d80 (patch)
treef5292bfb261d40f1bbe3bdfa2845de87245f78d4 /lib/chef/dsl/recipe.rb
parentad8fd4d65b48519ac154ad9bf9774322b0c6d902 (diff)
downloadchef-25dac92eeb1ffa83ec549bfed0b19672c5847d80.tar.gz
Pass deprecations through formatter instead of logs
Diffstat (limited to 'lib/chef/dsl/recipe.rb')
-rw-r--r--lib/chef/dsl/recipe.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/chef/dsl/recipe.rb b/lib/chef/dsl/recipe.rb
index 29cfcd478c..e3b91a7eab 100644
--- a/lib/chef/dsl/recipe.rb
+++ b/lib/chef/dsl/recipe.rb
@@ -140,8 +140,7 @@ class Chef
# method_missing manually. Not a fan. Not. A. Fan.
#
if respond_to?(method_symbol)
- Chef::Log.deprecation("Calling method_missing(#{method_symbol.inspect}) directly is deprecated in Chef 12 and will be removed in Chef 13.")
- Chef::Log.deprecation("Use public_send() or send() instead.")
+ Chef.log.deprecation("Calling method_missing(#{method_symbol.inspect}) directly is deprecated in Chef 12 and will be removed in Chef 13. Use public_send() or send() instead.")
return send(method_symbol, *args, &block)
end
@@ -150,7 +149,7 @@ class Chef
# never called. DEPRECATED.
#
if run_context.definitions.has_key?(method_symbol.to_sym)
- Chef::Log.deprecation("Definition #{method_symbol} (#{run_context.definitions[method_symbol.to_sym]}) was added to the run_context without calling Chef::DSL::Definitions.add_definition(#{method_symbol.to_sym.inspect}). This will become required in Chef 13.")
+ Chef.log.deprecation("Definition #{method_symbol} (#{run_context.definitions[method_symbol.to_sym]}) was added to the run_context without calling Chef::DSL::Definitions.add_definition(#{method_symbol.to_sym.inspect}). This will become required in Chef 13.")
Chef::DSL::Definitions.add_definition(method_symbol)
return send(method_symbol, *args, &block)
end