Skip to content

Commit

Permalink
Improve logging output
Browse files Browse the repository at this point in the history
Before: Notice: Puppet::ResourceApi::PuppetContext::PuppetLogger: title_provider[foo]: Creating: Creating 'foo' with {:namevar=>"foo", :ensure=>:present, :ip=>"127.0.1.1"}

After: Notice: title_provider[foo]: Creating: Creating 'foo' with {:namevar=>"foo", :ensure=>:present, :ip=>"127.0.1.1"}
  • Loading branch information
DavidS committed Mar 23, 2018
1 parent e769188 commit b5c7eaa
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/puppet/resource_api/puppet_context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,9 @@
require 'puppet/util/logging'

class Puppet::ResourceApi::PuppetContext < Puppet::ResourceApi::BaseContext
# declare a separate class to encapsulate Puppet's logging facilities
class PuppetLogger
extend Puppet::Util::Logging
end

protected

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

0 comments on commit b5c7eaa

Please sign in to comment.