Sha256: 6e1ab89c6a12eb0e481bb3a5d36c55396a23a5e5c254cb2678f72554ba5f8a7f

Contents?: true

Size: 402 Bytes

Versions: 11

Compression:

Stored size: 402 Bytes

Contents

module Fume
  module LoggerSupport
    def self.included(base)
      base.instance_eval do
        extend ClassMethods
        include InstanceMethods
      end
    end
    
    module ClassMethods
      def logger
        @logger ||= Rails.logger || Logger.new(STDOUT)
      end
    end
    
    module InstanceMethods
      def logger
        @logger ||= self.class.logger
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
fume-0.5.3 lib/fume/logger_support.rb
fume-0.5.2 lib/fume/logger_support.rb
fume-0.5.1 lib/fume/logger_support.rb
fume-0.5.0 lib/fume/logger_support.rb
fume-0.4.3 lib/fume/logger_support.rb
fume-0.4.2 lib/fume/logger_support.rb
fume-0.4.1 lib/fume/logger_support.rb
fume-0.4.0 lib/fume/logger_support.rb
fume-0.3.5 lib/fume/logger_support.rb
fume-0.3.4 lib/fume/logger_support.rb
fume-0.3.3 lib/fume/logger_support.rb