/usr/lib/ruby/vendor_ruby/mime/types/logger.rb is in ruby-mime-types 2.6.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | # -*- 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(_1, _2 = nil, _3 = nil)
super nil
@logdev = WarnLogDevice.new
@formatter = ->(_s, _d, _p, m) { m }
end
end
self.logger = WarnLogger.new(nil)
end
end
|