Class: Chef::Log

Inherits:
Object
  • Object
show all
Extended by:
Mixlib::Log
Defined in:
lib/chef/log.rb

Defined Under Namespace

Classes: Formatter

Class Method Summary collapse

Class Method Details

.deprecation(msg = nil, &block) ⇒ Object



38
39
40
41
42
43
44
45
# File 'lib/chef/log.rb', line 38

def self.deprecation(msg=nil, &block)
  if Chef::Config[:treat_deprecation_warnings_as_errors]
    error(msg, &block)
    raise Chef::Exceptions::DeprecatedFeatureError.new(msg)
  else
    warn(msg, &block)
  end
end