summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/util/logging.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/puppet/util/logging.rb b/lib/puppet/util/logging.rb
index bc52b17f0..b6845b8fa 100644
--- a/lib/puppet/util/logging.rb
+++ b/lib/puppet/util/logging.rb
@@ -15,6 +15,17 @@ module Puppet::Util::Logging
end
end
+ def deprication_warning(message)
+ $deprication_warnings ||= Hash.new(0)
+ if $deprication_warnings.length < 100 and ($deprication_warnings[message] += 1) == 1
+ warn message
+ end
+ end
+
+ def clear_deprication_warnings
+ $deprication_warnings.clear if $deprication_warnings
+ end
+
private
def is_resource?