Parent

Methods

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 6
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 10
def call(env)
  logger = ::Logger.new(env['rack.errors'])
  logger.level = @level

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

[Validate]

Generated with the Darkfish Rdoc Generator 2.