| The problem with just adding the Puppet::Util::Warnings warnings module and using debug_once is that all of the debug messages are then routed via the top-level Puppet.debug method instead of using the local debug method that the Puppet::Type instance has. This means that we loose the additional information that Puppet::Util::Logging provides when it's methods are called from a Type instance. I think this can be accommodated by the logging methods in {Puppet::Util::Warnings to take a second argument indicating which object should receive the notice, debug, and warn method calls and have that parameter default to the top-level Puppet module.
|