Sha256: 7c6d8d93dbb87bce0c64476e3e5e0c2e352d2c5bc85ed3c0d50967ab5712e77d

Contents?: true

Size: 669 Bytes

Versions: 4

Compression:

Stored size: 669 Bytes

Contents

require "logger"

module Blinkenstein
  class << self
    attr_accessor :logger
  end

  @logger       = Logger.new(STDOUT)
  @logger.level = ENV["DEBUG"] ? Logger::DEBUG : Logger::INFO

  module Logging
    def debug(*args)
      Blinkenstein.logger.debug(*args) if Blinkenstein.logger
    end

    def info(*args)
      Blinkenstein.logger.info(*args) if Blinkenstein.logger
    end

    def warn(*args)
      Blinkenstein.logger.warn(*args) if Blinkenstein.logger
    end

    def error(*args)
      Blinkenstein.logger.error(*args) if Blinkenstein.logger
    end

    def fatal(*args)
      Blinkenstein.logger.error(*args) if Blinkenstein.logger
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
blinkenstein-0.2.4 lib/blinkenstein/logging.rb
blinkenstein-0.2.3 lib/blinkenstein/logging.rb
blinkenstein-0.2.2 lib/blinkenstein/logging.rb
blinkenstein-0.2.1 lib/blinkenstein/logging.rb