diff options
| author | Paul Berry <paul@puppetlabs.com> | 2010-11-18 11:09:46 -0800 |
|---|---|---|
| committer | Paul Berry <paul@puppetlabs.com> | 2010-11-18 14:55:15 -0800 |
| commit | e8254856a5c9fa532886148cbe2b0f8d87179f01 (patch) | |
| tree | 0b1f407b0cc5d4a71a082cd0a85ed02dc672c19d /lib/puppet | |
| parent | cf18353472ce9c4e51157d21882a7f129853fd10 (diff) | |
| download | puppet-e8254856a5c9fa532886148cbe2b0f8d87179f01.tar.gz puppet-e8254856a5c9fa532886148cbe2b0f8d87179f01.tar.xz puppet-e8254856a5c9fa532886148cbe2b0f8d87179f01.zip | |
Maint: Added assertion to make sure Log.close_all succeeds
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.
Diffstat (limited to 'lib/puppet')
| -rw-r--r-- | 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 36a765c61..a5aacc265 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. |
