Sha256: 8daf40b0ecc4a8566b927ccb7f100985d5c74cafefab27d872dc93184e3937a7

Contents?: true

Size: 379 Bytes

Versions: 2

Compression:

Stored size: 379 Bytes

Contents

require 'logger'

module ReVIEW
  class Logger < ::Logger
    def initialize(*logdev)
      if logdev.empty?
        super(STDERR, formatter: ->(severity, _datetime, _progname, msg) { "#{severity}: #{msg}\n" })
      else
        super
      end
    end
  end

  def self.logger
    @logger ||= ReVIEW::Logger.new
  end

  def self.logger=(logger)
    @logger = logger
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
review-2.5.0 lib/review/logger.rb
review-2.4.0 lib/review/logger.rb