summaryrefslogtreecommitdiffstats
path: root/lib/puppet.rb
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2005-10-28 05:39:59 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2005-10-28 05:39:59 +0000
commitb6c63f6924250a14e998f4256e81c30e950fed99 (patch)
tree8915ec8881f2389b208dfda27a12d11f69730398 /lib/puppet.rb
parent0ae5e3392597452acf6a2e9f0d4ac976b8ec9846 (diff)
downloadpuppet-b6c63f6924250a14e998f4256e81c30e950fed99.tar.gz
puppet-b6c63f6924250a14e998f4256e81c30e950fed99.tar.xz
puppet-b6c63f6924250a14e998f4256e81c30e950fed99.zip
Central logging now works, although there appear to be a few kinks to work out.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@732 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet.rb')
-rw-r--r--lib/puppet.rb9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/puppet.rb b/lib/puppet.rb
index 1f4b18d44..7fe07de3d 100644
--- a/lib/puppet.rb
+++ b/lib/puppet.rb
@@ -53,14 +53,13 @@ module Puppet
@@config = Hash.new(false)
# define helper messages for each of the message levels
- Puppet::Log.levels.each { |level|
+ Puppet::Log.eachlevel { |level|
define_method(level,proc { |args|
if args.is_a?(Array)
args = args.join(" ")
end
Puppet::Log.create(
:level => level,
- :source => "Puppet",
:message => args
)
})
@@ -95,8 +94,6 @@ module Puppet
:parseonly => false,
:puppetport => 8139,
:masterport => 8140,
- :loglevel => :notice,
- :logdest => :file,
}
if Process.uid == 0
@defaults[:puppetconf] = "/etc/puppet"
@@ -126,8 +123,6 @@ module Puppet
end
when :loglevel:
return Puppet::Log.level
- when :logdest:
- return Puppet::Log.destination
else
# allow manual override
if @@config.include?(param)
@@ -161,7 +156,7 @@ module Puppet
when :loglevel:
Puppet::Log.level=(value)
when :logdest:
- Puppet::Log.destination=(value)
+ Puppet::Log.newdestination(value)
else
@@config[param] = value
end