Sha256: 47fb32f066f242960a855526a92a7c49a4b67c0616a7b2795b32db7f2fcbf4b3

Contents?: true

Size: 351 Bytes

Versions: 6

Compression:

Stored size: 351 Bytes

Contents

require 'logger'

module Rmega
  module Loggable
    def logger
      @@logger ||= begin
        Logger.new($stdout).tap do |l|
          l.formatter = Proc.new { | severity, time, progname, msg| "#{msg}\n" }
          l.level = Logger::ERROR
        end
      end
    end

    def self.included(base)
      base.send(:extend, self)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rmega-0.1.5 lib/rmega/loggable.rb
rmega-0.1.4 lib/rmega/loggable.rb
rmega-0.1.3 lib/rmega/loggable.rb
rmega-0.1.2 lib/rmega/loggable.rb
rmega-0.1.1 lib/rmega/loggable.rb
rmega-0.1.0 lib/rmega/loggable.rb