summaryrefslogtreecommitdiffstats
path: root/lib/puppet.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2005-06-29 03:11:06 +0000
committerLuke Kanies <luke@madstop.com>2005-06-29 03:11:06 +0000
commit0c4254a9c1bad795a8bcc895cff74b6dd961ba44 (patch)
tree2d512a90e147d020486ff71591ad64202814ac06 /lib/puppet.rb
parent573d3018a67521f37dbbd46e86c7d1d8b7bc2703 (diff)
downloadpuppet-0c4254a9c1bad795a8bcc895cff74b6dd961ba44.tar.gz
puppet-0c4254a9c1bad795a8bcc895cff74b6dd961ba44.tar.xz
puppet-0c4254a9c1bad795a8bcc895cff74b6dd961ba44.zip
metric testing and graphing now works in the library, although nothing has been done in the language
git-svn-id: https://reductivelabs.com/svn/puppet/library/trunk@314 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet.rb')
-rw-r--r--lib/puppet.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/puppet.rb b/lib/puppet.rb
index c144a6bb4..40c904e08 100644
--- a/lib/puppet.rb
+++ b/lib/puppet.rb
@@ -19,6 +19,8 @@ module Puppet
@@config = Hash.new(false)
@@config[:puppetroot] = "/var/puppet"
+ @@config[:rrddir] = "/var/puppet/rrd"
+ @@config[:rrdgraph] = false
@@config[:logdir] = "/var/puppet/log"
@@config[:logfile] = "/var/puppet/log/puppet.log"
@@config[:statefile] = "/var/puppet/log/state"
@@ -51,6 +53,16 @@ module Puppet
# configuration parameter access and stuff
def Puppet.[]=(param,value)
@@config[param] = value
+ case param
+ when :debug:
+ if value
+ Puppet::Log.level(:debug)
+ else
+ Puppet::Log.level(:notice)
+ end
+ when :loglevel:
+ Puppet::Log.level(value)
+ end
end
end