lib/rackamole/logger.rb in rackamole-0.0.6 vs lib/rackamole/logger.rb in rackamole-0.0.7

- old
+ new

@@ -3,11 +3,11 @@ module Rackamole class Logger class ConfigurationError < StandardError ; end #:nodoc: - attr_reader :log # here for testing, don't really use it. + attr_reader :log #:nodoc: extend Forwardable def_delegators :@log, :debug, :warn, :info, :error, :fatal def_delegators :@log, :level=, :level def_delegators :@log, :debug?, :warn?, :info?, :error?, :fatal? @@ -45,10 +45,13 @@ :email_alert_server => nil , :email_alert_buffsize => 200 , } end - # create a new logger + # Creates a logger for mole usage by leveraging the most excellent logging gem. + # This provides for a semi persistent storage for mole information, typically set up + # for the console or a file. By default moled features will be sent out to the console. + # Alternatively you can store the moled info to a file. # def initialize( opts = {} ) @options = ::Rackamole::Logger.default_options.merge(opts) @log = ::Logging::Logger[@options[:logger_name]] @layout = ::Logging::Layouts::Pattern.new( { :pattern => @options[:layout_pattern] } )