diff options
author | John Keiser <john@johnkeiser.com> | 2015-08-31 14:38:50 -0700 |
---|---|---|
committer | John Keiser <john@johnkeiser.com> | 2015-09-01 19:30:43 -0700 |
commit | 25dac92eeb1ffa83ec549bfed0b19672c5847d80 (patch) | |
tree | f5292bfb261d40f1bbe3bdfa2845de87245f78d4 /lib/chef/resource.rb | |
parent | ad8fd4d65b48519ac154ad9bf9774322b0c6d902 (diff) | |
download | chef-25dac92eeb1ffa83ec549bfed0b19672c5847d80.tar.gz |
Pass deprecations through formatter instead of logs
Diffstat (limited to 'lib/chef/resource.rb')
-rw-r--r-- | lib/chef/resource.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/resource.rb b/lib/chef/resource.rb index 5bef40625f..6b8c5434f5 100644 --- a/lib/chef/resource.rb +++ b/lib/chef/resource.rb @@ -809,7 +809,7 @@ class Chef end if !options[:default].frozen? && (options[:default].is_a?(Array) || options[:default].is_a?(Hash)) - Chef::Log.warn("Property #{self}.#{name} has an array or hash default (#{options[:default]}). This means that if one resource modifies or appends to it, all other resources of the same type will also see the changes. Either freeze the constant with `.freeze` to prevent appending, or use lazy { #{options[:default].inspect} }.") + Chef.log.deprecation("Property #{self}.#{name} has an array or hash default (#{options[:default]}). This means that if one resource modifies or appends to it, all other resources of the same type will also see the changes. Either freeze the constant with `.freeze` to prevent appending, or use lazy { #{options[:default].inspect} }.") end local_properties = properties(false) @@ -1211,7 +1211,7 @@ class Chef # @deprecated Use resource_name instead. # def self.dsl_name - Chef::Log.deprecation "Resource.dsl_name is deprecated and will be removed in Chef 13. Use resource_name instead." + Chef.log.deprecation "Resource.dsl_name is deprecated and will be removed in Chef 13. Use resource_name instead." if name name = self.name.split('::')[-1] convert_to_snake_case(name) @@ -1288,7 +1288,7 @@ class Chef # def self.provider_base(arg=nil) if arg - Chef::Log.deprecation("Resource.provider_base is deprecated and will be removed in Chef 13. Use provides on the provider, or provider on the resource, instead.") + Chef.log.deprecation("Resource.provider_base is deprecated and will be removed in Chef 13. Use provides on the provider, or provider on the resource, instead.") end @provider_base ||= arg || Chef::Provider end |