Sha256: 0b0a3b8c74faa3d7f99ddc331c5542f4303760e3175c807e0f01a620f5b2da25

Contents?: true

Size: 776 Bytes

Versions: 75

Compression:

Stored size: 776 Bytes

Contents

# frozen_string_literal: true

# -*- ruby encoding: utf-8 -*-

require 'logger'

##
module MIME
  ##
  class Types
    class << self
      # Configure the MIME::Types logger. This defaults to an instance of a
      # logger that passes messages (unformatted) through to Kernel#warn.
      attr_accessor :logger
    end

    class WarnLogger < ::Logger #:nodoc:
      class WarnLogDevice < ::Logger::LogDevice #:nodoc:
        def initialize(*)
        end

        def write(m)
          Kernel.warn(m)
        end

        def close
        end
      end

      def initialize(_one, _two = nil, _three = nil)
        super nil
        @logdev = WarnLogDevice.new
        @formatter = ->(_s, _d, _p, m) { m }
      end
    end

    self.logger = WarnLogger.new(nil)
  end
end

Version data entries

75 entries across 41 versions & 8 rubygems

Version Path
vagrant-unbundled-2.2.19.0 vendor/bundle/ruby/3.0.0/gems/mime-types-3.3.1/lib/mime/types/logger.rb
tdiary-5.2.0 vendor/bundle/ruby/2.7.0/gems/mime-types-3.3.1/lib/mime/types/logger.rb
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/3.0.0/gems/mime-types-3.3.1/lib/mime/types/logger.rb
tdiary-5.1.7 vendor/bundle/ruby/2.7.0/gems/mime-types-3.3.1/lib/mime/types/logger.rb
tdiary-5.1.7 vendor/bundle/ruby/3.0.0/gems/mime-types-3.3.1/lib/mime/types/logger.rb
tdiary-5.1.6 vendor/bundle/ruby/3.0.0/gems/mime-types-3.3.1/lib/mime/types/logger.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/mime-types-3.3.1/lib/mime/types/logger.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/mime-types-3.3.1/lib/mime/types/logger.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/vendor/bundle/ruby/2.7.0/gems/mime-types-3.3.1/lib/mime/types/logger.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/2.7.0/gems/mime-types-3.3.1/lib/mime/types/logger.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/3.0.0/gems/mime-types-3.3.1/lib/mime/types/logger.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/2.7.0/gems/mime-types-3.3.1/lib/mime/types/logger.rb
kinetic_sdk-5.0.19 gems/mime-types-3.3.1/lib/mime/types/logger.rb
tdiary-5.1.5 vendor/bundle/ruby/2.7.0/gems/mime-types-3.3.1/lib/mime/types/logger.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/vendor/bundle/ruby/2.7.0/gems/mime-types-3.3.1/lib/mime/types/logger.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/mime-types-3.3.1/lib/mime/types/logger.rb
vagrant-unbundled-2.2.14.0 vendor/bundle/ruby/2.7.0/gems/mime-types-3.3.1/lib/mime/types/logger.rb
tdiary-5.1.4 vendor/bundle/ruby/2.7.0/gems/mime-types-3.3.1/lib/mime/types/logger.rb
paynow_sdk-1.1.0 vendor/bundle/ruby/2.7.0/gems/mime-types-3.3.1/lib/mime/types/logger.rb
paynow_sdk-1.1.0 vendor/bundle/ruby/2.7.0/gems/paynow_sdk-1.0.9/vendor/bundle/ruby/2.7.0/gems/mime-types-3.3.1/lib/mime/types/logger.rb