Sha256: 9773c7b2b49404c089cb0885e4b6ed302e95e97a7ad5732896e0c840da0b6508
Contents?: true
Size: 384 Bytes
Versions: 73
Compression:
Stored size: 384 Bytes
Contents
# 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
Version data entries
73 entries across 57 versions & 15 rubygems