diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2015-02-09 16:16:43 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2015-02-09 16:16:43 -0800 |
commit | 5a69125a49ebb10848cc87cb3e31a540b517c633 (patch) | |
tree | 2ecea98b9f88ec43de28775469ce61ad89439ee0 /lib/chef/deprecation/warnings.rb | |
parent | f9ca811feb8560a9b8e054030d6cf5ea62d8cfda (diff) | |
download | chef-5a69125a49ebb10848cc87cb3e31a540b517c633.tar.gz |
peer review feedback for deprecation warnings
Diffstat (limited to 'lib/chef/deprecation/warnings.rb')
-rw-r--r-- | lib/chef/deprecation/warnings.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/chef/deprecation/warnings.rb b/lib/chef/deprecation/warnings.rb index 68b1d0e202..34f468ff53 100644 --- a/lib/chef/deprecation/warnings.rb +++ b/lib/chef/deprecation/warnings.rb @@ -24,9 +24,11 @@ class Chef method_names.each do |name| m = instance_method(name) define_method(name) do |*args| - Chef::Log.deprecation "Method '#{name}' of '#{self.class}' is deprecated. It will be removed in Chef 12." - Chef::Log.deprecation "Please update your cookbooks accordingly. Accessed from:" - caller[0..3].each {|l| Chef::Log.warn l} + message = [] + message << "Method '#{name}' of '#{self.class}' is deprecated. It will be removed in Chef 12." + message << "Please update your cookbooks accordingly. Accessed from:" + caller[0..3].each {|l| message << l} + Chef::Log.deprecation message super(*args) end end |