ok

Mini Shell

Direktori : /proc/thread-self/root/opt/cpanel/ea-ruby27/root/usr/share/gems/gems/rack-2.2.8/lib/rack/
Upload File :
Current File : //proc/thread-self/root/opt/cpanel/ea-ruby27/root/usr/share/gems/gems/rack-2.2.8/lib/rack/logger.rb

# frozen_string_literal: true

require 'logger'

module Rack
  # Sets up rack.logger to write to rack.errors stream
  class Logger
    def initialize(app, level = ::Logger::INFO)
      @app, @level = app, level
    end

    def call(env)
      logger = ::Logger.new(env[RACK_ERRORS])
      logger.level = @level

      env[RACK_LOGGER] = logger
      @app.call(env)
    end
  end
end

Zerion Mini Shell 1.0