summaryrefslogtreecommitdiffstats
path: root/lib/puppet/util
diff options
context:
space:
mode:
authorNick Lewis <nick@puppetlabs.com>2011-04-12 13:13:30 -0700
committerNick Lewis <nick@puppetlabs.com>2011-04-12 13:13:30 -0700
commit2dfa0afb57ec80f451a54ef96341d413819c14c7 (patch)
tree228ce122f952d72b513562a1874f93624ce855fb /lib/puppet/util
parent665fabdb3e468d1ef38d689b9cb0d75b9d788f88 (diff)
parente569f3baec68b9f53b37ac07984b7a858b155991 (diff)
downloadpuppet-2dfa0afb57ec80f451a54ef96341d413819c14c7.tar.gz
puppet-2dfa0afb57ec80f451a54ef96341d413819c14c7.tar.xz
puppet-2dfa0afb57ec80f451a54ef96341d413819c14c7.zip
Merge branch 'ticket/next/5027' into next
Diffstat (limited to 'lib/puppet/util')
-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..4e76ae414 100644
--- a/lib/puppet/util/logging.rb
+++ b/lib/puppet/util/logging.rb
@@ -15,6 +15,17 @@ module Puppet::Util::Logging
end
end
+ def deprecation_warning(message)
+ $deprecation_warnings ||= Hash.new(0)
+ if $deprecation_warnings.length < 100 and ($deprecation_warnings[message] += 1) == 1
+ warning message
+ end
+ end
+
+ def clear_deprecation_warnings
+ $deprecation_warnings.clear if $deprecation_warnings
+ end
+
private
def is_resource?