# class Rack::Logger

Sets up rack.logger to write to rack.errors stream

### Public Class Methods

new(app, level = ::Logger::INFO) click to toggle source

    # File lib/rack/logger.rb, line 8
    def initialize(app, level = ::Logger::INFO)
      @app, @level = app, level
    end

### Public Instance Methods

call(env) click to toggle source

    # File lib/rack/logger.rb, line 12
    def call(env)
      logger = ::Logger.new(env[RACK_ERRORS])
      logger.level = @level

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