Class | MCollective::Log |
In: |
lib/mcollective/log.rb
|
Parent: | Object |
A simple singleton class that allows logging at various levels.
# File lib/mcollective/log.rb, line 8 8: def initialize 9: config = Config.instance 10: raise ("Configuration has not been loaded, can't start logger") unless config.configured 11: 12: require "mcollective/logger/#{config.logger_type.downcase}_logger" 13: @logger = eval("MCollective::Logger::#{config.logger_type.capitalize}_logger.new") 14: 15: @logger.start 16: rescue Exception => e 17: STDERR.puts "Could not start logger: #{e.class} #{e}" 18: end