summaryrefslogtreecommitdiffstats
path: root/lib/puppet.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-11-07 15:21:19 -0600
committertest branch <puppet-dev@googlegroups.com>2010-02-17 06:50:53 -0800
commitd93d80a0afdbd53d87dc4a7498609117091e864b (patch)
tree4bd4cce56eac87b0ece7f4d7b642729cf71e4ff9 /lib/puppet.rb
parentc6dd180450404c74bac8aadbf68b297c5f74764c (diff)
downloadpuppet-d93d80a0afdbd53d87dc4a7498609117091e864b.tar.gz
puppet-d93d80a0afdbd53d87dc4a7498609117091e864b.tar.xz
puppet-d93d80a0afdbd53d87dc4a7498609117091e864b.zip
Using Logging module in main Puppet module
We've had essentially duplicate methods in this module forever, and this just removes that duplication. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet.rb')
-rw-r--r--lib/puppet.rb21
1 files changed, 3 insertions, 18 deletions
diff --git a/lib/puppet.rb b/lib/puppet.rb
index a78853a10..3c5eebb0c 100644
--- a/lib/puppet.rb
+++ b/lib/puppet.rb
@@ -9,7 +9,6 @@ require 'singleton'
require 'facter'
require 'puppet/error'
require 'puppet/util'
-require 'puppet/util/log'
require 'puppet/util/autoload'
require 'puppet/util/settings'
require 'puppet/util/feature'
@@ -42,23 +41,9 @@ module Puppet
# The services running in this process.
@services ||= []
- # define helper messages for each of the message levels
- Puppet::Util::Log.eachlevel { |level|
- define_method(level,proc { |args|
- if args.is_a?(Array)
- args = args.join(" ")
- end
- Puppet::Util::Log.create(
- :level => level,
- :message => args
- )
- })
- module_function level
- }
-
- # I keep wanting to use Puppet.error
- # XXX this isn't actually working right now
- alias :error :err
+ require 'puppet/util/logging'
+
+ extend Puppet::Util::Logging
# The feature collection
@features = Puppet::Util::Feature.new('puppet/feature')