D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby33
/
share
/
gems
/
gems
/
rack-3.0.8
/
lib
/
rack
/
Filename :
logger.rb
back
Copy
# 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