Parent

Methods

Rackamole::Logger

Public Class Methods

new( opts = {} ) click to toggle source

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.

    # File lib/rackamole/logger.rb, line 55
55:     def initialize( opts = {} )
56:       @options = ::Rackamole::Logger.default_options.merge(opts)
57:       @log     = ::Logging::Logger[@options[:logger_name]]
58:       @layout  = ::Logging::Layouts::Pattern.new( { :pattern => @options[:layout_pattern] } )
59:      
60:       # add appenders explicitly, since this logger may already be defined and
61:       # already have loggers
62:       @appenders = []
63:       @appenders << log_file_appender if @options[:log_file]
64:       @appenders << email_appender if @options[:email_alerts_to]
65: 
66:       @log.appenders = @appenders
67:       @log.level = @options[:log_level]
68:       @log.additive = @options[:additive]
69:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.