diff options
author | Luke Kanies <luke@madstop.com> | 2009-01-31 10:29:48 -0700 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2009-02-06 18:08:43 -0600 |
commit | 8dc0005473ad2b0785919e0bd79ac7d60342625d (patch) | |
tree | a401b905ca2858920dbc55c19368d8c67934cea6 /lib | |
parent | 37d1a7cf2c637e2bde16623007014125066fcec5 (diff) | |
download | puppet-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')
-rw-r--r-- | lib/puppet/util/log.rb | 7 |
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| |