[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:14 UTC 2009


The following commit has been merged in the master branch:
commit a7744438f83c97886e81990fb34ddcbab8bc0d9e
Author: Luke Kanies <luke at madstop.com>
Date:   Fri Oct 3 17:39:18 2008 -0500

    Fixing #1089 - Log messages are now tagged with the log level,
    making it easier to match messages in the 'tagmail' report.
    
    Signed-off-by: Luke Kanies <luke at madstop.com>

diff --git a/CHANGELOG b/CHANGELOG
index ba05bb8..2b0e808 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,9 @@
     Fixing #947 - pluginsync no longer fails poorly when no plugins exist
 
     Fixed #981 - Removed 'Adding aliases' info message
+    
+    Fixing #1089 - Log messages are now tagged with the log level,
+    making it easier to match messages in the 'tagmail' report.
 
     Fixing #1614 - Environments no longer have to be listed out
 
diff --git a/lib/puppet/util/log.rb b/lib/puppet/util/log.rb
index f5119bb..3524949 100644
--- a/lib/puppet/util/log.rb
+++ b/lib/puppet/util/log.rb
@@ -509,6 +509,9 @@ class Puppet::Util::Log
             @source = "Puppet"
         end
 
+        # Tag myself with my log level
+        tag(level)
+
         Log.newmessage(self)
     end
 
diff --git a/spec/unit/util/log.rb b/spec/unit/util/log.rb
index 7f37e9f..aa00602 100755
--- a/spec/unit/util/log.rb
+++ b/spec/unit/util/log.rb
@@ -60,7 +60,9 @@ describe Puppet::Util::Log do
         end
 
         it "should make available any passed-in tags" do
-            Puppet::Util::Log.new(:level => "notice", :message => :foo, :tags => %w{foo bar}).tags.should == %w{foo bar}
+            log = Puppet::Util::Log.new(:level => "notice", :message => :foo, :tags => %w{foo bar})
+            log.tags.should be_include("foo")
+            log.tags.should be_include("bar")
         end
 
         it "should use an passed-in source" do
@@ -86,8 +88,7 @@ describe Puppet::Util::Log do
         end
 
         it "should tag itself with its log level" do
-            pending "not yet"
-            Puppet::Util::Log.new(:level => "notice", :message => :foo, :tags => %w{one two}).should be_tagged(:one)
+            Puppet::Util::Log.new(:level => "notice", :message => :foo).should be_tagged(:notice)
         end
 
         it "should return its message when converted to a string" do

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list