Sha256: fb3d1460b26c73a7baf145c13d6af35c5b053beb0484d6a6c0198f0c6f7a0bb5

Contents?: true

Size: 431 Bytes

Versions: 9

Compression:

Stored size: 431 Bytes

Contents

module Speedos
  class Log
    def self.logger
      @logger ||= Logger.new(STDOUT)

      @logger.formatter = proc { |severity, datetime, progname, msg| "[#{severity}] #{datetime}: #{msg}\n" }
      @logger
    end

    def self.logger= logger
      logger = Logger.new(logger) if logger.is_a? String
      @logger = logger
    end

    def self.method_missing meth, *args, &block
      logger.send(meth, *args)
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
speedos-0.0.14 lib/speedos/log.rb
speedos-0.0.13 lib/speedos/log.rb
speedos-0.0.12 lib/speedos/log.rb
speedos-0.0.11 lib/speedos/log.rb
speedos-0.0.10 lib/speedos/log.rb
speedos-0.0.9 lib/speedos/log.rb
speedos-0.0.8 lib/speedos/log.rb
speedos-0.0.7 lib/speedos/log.rb
speedos-0.0.6 lib/speedos/log.rb