[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, master, updated. debian/0.24.7-1-98-gf19c0e5
James Turnbull
james at lovedthanlost.net
Wed Apr 8 21:48:17 UTC 2009
The following commit has been merged in the master branch:
commit f07d9283d70378066987017d436db6deb1adae9d
Author: Peter Meier <peter.meier at immerda.ch>
Date: Sun Feb 22 00:11:34 2009 +0100
Use Puppet.debug instead of own debug flag
It's better to use puppet's logging environment than an own.
Especially if the default is quite verbose and can't be set by
config flag.
diff --git a/lib/puppet/rails/host.rb b/lib/puppet/rails/host.rb
index a429cbf..b60b068 100644
--- a/lib/puppet/rails/host.rb
+++ b/lib/puppet/rails/host.rb
@@ -3,8 +3,6 @@ require 'puppet/rails/fact_name'
require 'puppet/rails/source_file'
require 'puppet/util/rails/collection_merger'
-Puppet::TIME_DEBUG = true
-
class Puppet::Rails::Host < ActiveRecord::Base
include Puppet::Util
include Puppet::Util::CollectionMerger
@@ -36,7 +34,7 @@ class Puppet::Rails::Host < ActiveRecord::Base
host = new(:name => node.name)
end
}
- Puppet.notice("Searched for host in %0.2f seconds" % seconds) if defined?(Puppet::TIME_DEBUG)
+ Puppet.debug("Searched for host in %0.2f seconds" % seconds)
if ip = node.parameters["ipaddress"]
host.ip = ip
end
@@ -51,7 +49,7 @@ class Puppet::Rails::Host < ActiveRecord::Base
seconds = Benchmark.realtime {
host.setresources(resources)
}
- Puppet.notice("Handled resources in %0.2f seconds" % seconds) if defined?(Puppet::TIME_DEBUG)
+ Puppet.debug("Handled resources in %0.2f seconds" % seconds)
host.last_compile = Time.now
@@ -119,17 +117,17 @@ class Puppet::Rails::Host < ActiveRecord::Base
seconds = Benchmark.realtime {
existing = find_resources()
}
- Puppet.notice("Searched for resources in %0.2f seconds" % seconds) if defined?(Puppet::TIME_DEBUG)
+ Puppet.debug("Searched for resources in %0.2f seconds" % seconds)
seconds = Benchmark.realtime {
find_resources_parameters_tags(existing)
} if id
- Puppet.notice("Searched for resource params and tags in %0.2f seconds" % seconds) if defined?(Puppet::TIME_DEBUG)
+ Puppet.debug("Searched for resource params and tags in %0.2f seconds" % seconds)
seconds = Benchmark.realtime {
compare_to_catalog(existing, list)
}
- Puppet.notice("Resource comparison took %0.2f seconds" % seconds) if defined?(Puppet::TIME_DEBUG)
+ Puppet.debug("Resource comparison took %0.2f seconds" % seconds)
end
def find_resources
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list