Sha256: 42ab96ec8a9f8db8bfbef525d1dc923e8e41931ba93214163d6ae60696fbb855

Contents?: true

Size: 423 Bytes

Versions: 3

Compression:

Stored size: 423 Bytes

Contents

require 'logger'

module ReVIEW
  class Logger < ::Logger
    def initialize(io = STDERR, progname: '--')
      super(io, progname: progname)
      self.formatter = ->(severity, _datetime, name, msg) { "#{severity} #{name}: #{msg}\n" }
    end
  end

  def self.logger
    @logger ||= ReVIEW::Logger.new(STDERR, progname: File.basename($PROGRAM_NAME, '.*'))
  end

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
review-4.2.0 lib/review/logger.rb
review-4.1.0 lib/review/logger.rb
review-4.0.0 lib/review/logger.rb