[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, master, updated. debian/0.24.6-1-356-g5718585
James Turnbull
james at lovedthanlost.net
Fri Jan 23 14:21:15 UTC 2009
The following commit has been merged in the master branch:
commit 1c6d57e94196c8238a1609858bad5e5db15d1f0e
Author: Luke Kanies <luke at madstop.com>
Date: Fri Oct 3 17:42:16 2008 -0500
Doing some simple refactorings on Puppet::Log
Signed-off-by: Luke Kanies <luke at madstop.com>
diff --git a/lib/puppet/util/log.rb b/lib/puppet/util/log.rb
index 3524949..0dfd36d 100644
--- a/lib/puppet/util/log.rb
+++ b/lib/puppet/util/log.rb
@@ -488,26 +488,16 @@ class Puppet::Util::Log
raise ArgumentError, "Level is not a string or symbol: #{args[:level].class}"
end
- # Just return unless we're actually at a level we should send
- #return unless self.class.sendlevel?(@level)
-
@message = args[:message].to_s
@time = Time.now
- # this should include the host name, and probly lots of other
- # stuff, at some point
- unless self.class.validlevel?(level)
- raise ArgumentError, "Invalid message level #{level}"
- end
+
+ raise ArgumentError, "Invalid log level %s" % level unless self.class.validlevel?(level)
if tags = args[:tags]
tags.each { |t| self.tag(t) }
end
- if args.include?(:source)
- self.source = args[:source]
- else
- @source = "Puppet"
- end
+ self.source = args[:source] || "Puppet"
# Tag myself with my log level
tag(level)
@@ -550,5 +540,8 @@ class Puppet::Util::Log
return @message
end
end
-Puppet::Log = Puppet::Util::Log
+# This is for backward compatibility from when we changed the constant to Puppet::Util::Log
+# because the reports include the constant name. Apparently the alias was created in
+# March 2007, should could probably be removed soon.
+Puppet::Log = Puppet::Util::Log
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list