Sha256: 53ea4337e34aebc3117f69287cbcf1397d9ed6ef0c519cad3b504caac0043183
Contents?: true
Size: 414 Bytes
Versions: 26
Compression:
Stored size: 414 Bytes
Contents
# frozen_string_literal: true require 'logger' require_relative 'constants' 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
26 entries across 25 versions & 6 rubygems