Sha256: 1af2c57a596678c4d87d15955d2ef250d35b6401d6a4a10e612c0a9a24caf2bd

Contents?: true

Size: 422 Bytes

Versions: 1

Compression:

Stored size: 422 Bytes

Contents

module Heirloom
  class HeirloomLogger
    
    def initialize(args = {})
      @logger = args[:logger] ||= Logger.new(STDOUT)

      unless args[:logger]
        @logger.datetime_format = "%Y-%m-%d %H:%M:%S"
        @logger.formatter = proc do |severity, datetime, progname, msg|
            "#{datetime}: #{msg}\n"
        end
      end

      @logger
    end

    def info(msg)
      @logger.info msg
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
heirloom-0.1.4 lib/heirloom/logger.rb