Sha256: 8961d6eac3e93a4556d035ca75c886d5ff3000b6b5f85c273606c157d8801cd6

Contents?: true

Size: 326 Bytes

Versions: 3

Compression:

Stored size: 326 Bytes

Contents

# coding: utf-8

module KuaiJieQian
  module Logger

    def logger
      @logger ||= default_logger
    end

    def default_logger
      _logger = ::Logger.new(STDOUT)
      _logger.level = ::Logger::INFO
      _logger
    end

    def logger=(log)
      @logger = (log ? log : ::Logger.new('/dev/null'))
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
kuai_jie_qian-0.3.0 lib/kuai_jie_qian/logger.rb
kuai_jie_qian-0.2.0 lib/kuai_jie_qian/logger.rb
kuai_jie_qian-0.1.0 lib/kuai_jie_qian/logger.rb