Sha256: 572e58a407eba8845d2838502116c06ddd01e1a273174f5ebee44956f86d089a

Contents?: true

Size: 312 Bytes

Versions: 16

Compression:

Stored size: 312 Bytes

Contents

MongoMapper.class_eval do
  class << self
    
    def logger
      return @logger ||= Logger.new(nil) if defined?(Spec)

      @logger ||= ("irb" == $0) ? Logger.new(STDOUT) : (defined?(Rails) ? Rails.logger : Logger.new(STDOUT))
    end
    
    def logger= logger
      @logger = logger
    end
    
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
rails-ext-0.3.13 lib/mongo_mapper_ext/mongo_mapper.rb
rails-ext-0.3.12 lib/mongo_mapper_ext/mongo_mapper.rb
rails-ext-0.3.11 lib/mongo_mapper_ext/mongo_mapper.rb
rails-ext-0.3.10 lib/mongo_mapper_ext/mongo_mapper.rb
rails-ext-0.3.9 lib/mongo_mapper_ext/mongo_mapper.rb
rails-ext-0.3.8 lib/mongo_mapper_ext/mongo_mapper.rb
rails-ext-0.3.6 lib/mongo_mapper_ext/mongo_mapper.rb
rails-ext-0.3.5 lib/mongo_mapper_ext/mongo_mapper.rb
rails-ext-0.3.4 lib/mongo_mapper_ext/mongo_mapper.rb
rails-ext-0.3.3 lib/mongo_mapper_ext/mongo_mapper.rb
rails-ext-0.3.2 lib/mongo_mapper_ext/mongo_mapper.rb
rails-ext-0.3.1 lib/mongo_mapper_ext/mongo_mapper.rb
rails-ext-0.3 lib/mongo_mapper_ext/mongo_mapper.rb
rails-ext-0.2.21 lib/mongo_mapper_ext/mongo_mapper.rb
rails-ext-0.2.20 lib/mongo_mapper_ext/mongo_mapper.rb
rails-ext-0.2.19 lib/mongo_mapper_ext/mongo_mapper.rb