If the hash containing log destinations gets corrupted, Log.close_all
could fail silently.  This change adds an exception to make these
failures easier to debug should they ever happen again.

Signed-off-by: Paul Berry <p...@puppetlabs.com>
---
Local-branch: maint/next/log_refactoring
 lib/puppet/util/log.rb |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/puppet/util/log.rb b/lib/puppet/util/log.rb
index 36a765c..a5aacc2 100644
--- a/lib/puppet/util/log.rb
+++ b/lib/puppet/util/log.rb
@@ -57,6 +57,7 @@ class Puppet::Util::Log
     destinations.keys.each { |dest|
       close(dest)
     }
+    raise Puppet::DevError.new("Log.close_all failed to close 
#...@destinations.keys.inspect}") if !...@destinations.empty?
   end
 
   # Flush any log destinations that support such operations.
-- 
1.7.2

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to puppet-...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to