vendored/puppet/lib/puppet/util/storage.rb in bolt-0.11.0 vs vendored/puppet/lib/puppet/util/storage.rb in bolt-0.12.0
- old
+ new
@@ -51,11 +51,11 @@
end
unless File.file?(filename)
Puppet.warning(_("Checksumfile %{filename} is not a file, ignoring") % { filename: filename })
return
end
- Puppet::Util.benchmark(:debug, "Loaded state") do
+ Puppet::Util.benchmark(:debug, "Loaded state in %{seconds} seconds") do
begin
@@state = Puppet::Util::Yaml.load_file(filename)
rescue Puppet::Util::Yaml::YamlLoadError => detail
Puppet.err _("Checksumfile %{filename} is corrupt (%{detail}); replacing") % { filename: filename, detail: detail }
@@ -80,10 +80,10 @@
def self.store
Puppet.debug "Storing state"
Puppet.info _("Creating state file %{file}") % { file: Puppet[:statefile] } unless Puppet::FileSystem.exist?(Puppet[:statefile])
- Puppet::Util.benchmark(:debug, "Stored state") do
+ Puppet::Util.benchmark(:debug, "Stored state in %{seconds} seconds") do
Puppet::Util::Yaml.dump(@@state, Puppet[:statefile])
end
end
end