Module: Puppet::Util::Logging

Instance Method Summary collapse

Instance Method Details

#clear_deprecation_warningsObject



25
26
27
# File 'lib/vendor/puppet/util/logging.rb', line 25

def clear_deprecation_warnings
  $deprecation_warnings.clear if $deprecation_warnings
end

#deprecation_warning(message) ⇒ Object



18
19
20
21
22
23
# File 'lib/vendor/puppet/util/logging.rb', line 18

def deprecation_warning(message)
  $deprecation_warnings ||= Hash.new(0)
  if $deprecation_warnings.length < 100 and ($deprecation_warnings[message] += 1) == 1
    warning message
  end
end

#send_log(level, message) ⇒ Object



6
7
8
# File 'lib/vendor/puppet/util/logging.rb', line 6

def send_log(level, message)
  Puppet::Util::Log.create({:level => level, :source => log_source, :message => message}.merge())
end