summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-01-31 10:29:48 -0700
committerLuke Kanies <luke@madstop.com>2009-02-06 18:08:43 -0600
commit8dc0005473ad2b0785919e0bd79ac7d60342625d (patch)
treea401b905ca2858920dbc55c19368d8c67934cea6 /lib/puppet
parent37d1a7cf2c637e2bde16623007014125066fcec5 (diff)
downloadpuppet-8dc0005473ad2b0785919e0bd79ac7d60342625d.tar.gz
puppet-8dc0005473ad2b0785919e0bd79ac7d60342625d.tar.xz
puppet-8dc0005473ad2b0785919e0bd79ac7d60342625d.zip
Adding a 'close_all' method to the Log class.
This moves the code out of Daemon. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/util/log.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/puppet/util/log.rb b/lib/puppet/util/log.rb
index b57faad42..a74432021 100644
--- a/lib/puppet/util/log.rb
+++ b/lib/puppet/util/log.rb
@@ -104,6 +104,13 @@ class Puppet::Util::Log
end
end
+ def self.close_all
+ # And close all logs except the console.
+ destinations.each do |dest|
+ close(dest)
+ end
+ end
+
# Flush any log destinations that support such operations.
def Log.flush
@destinations.each { |type, dest|