From 8dc0005473ad2b0785919e0bd79ac7d60342625d Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Sat, 31 Jan 2009 10:29:48 -0700 Subject: Adding a 'close_all' method to the Log class. This moves the code out of Daemon. Signed-off-by: Luke Kanies --- lib/puppet/util/log.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib') 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| -- cgit