Sha256: a448d12e4aceca4c3d5c45db00b70da0f47ebe639a74342a3cf2b558df639372
Contents?: true
Size: 543 Bytes
Versions: 13
Compression:
Stored size: 543 Bytes
Contents
require 'puppet/resource_api/base_context' # Implement Resource API Conext to log through an IO object, defaulting to `$stderr`. # There is no access to a device here. You can supply a transport if necessary. class Puppet::ResourceApi::IOContext < Puppet::ResourceApi::BaseContext attr_reader :transport def initialize(definition, target = $stderr, transport = nil) super(definition) @target = target @transport = transport end protected def send_log(level, message) @target.puts "#{level}: #{message}" end end
Version data entries
13 entries across 13 versions & 1 rubygems