# Rack::Loggerrequire'logger'moduleRack# Sets up rack.logger to write to rack.errors streamclassLoggerdefinitialize(app,level=::Logger::INFO)@app,@level=app,levelenddefcall(env)logger=::Logger.new(env[RACK_ERRORS])logger.level=@levelenv[RACK_LOGGER]=logger@app.call(env)endendend# Rack::NullLoggermoduleRackclassNullLoggerdefinitialize(app)@app=appenddefcall(env)env[RACK_LOGGER]=self@app.call(env)end...........
env.update(RACK_VERSION=>Rack::VERSION,RACK_INPUT=>rack_input,RACK_ERRORS=>$stderr,RACK_MULTITHREAD=>true,RACK_MULTIPROCESS=>false,RACK_RUNONCE=>false,RACK_URL_SCHEME=>["yes","on","1"].include?(env[HTTPS])?"https":"http",RACK_IS_HIJACK=>true,RACK_HIJACK=>lambda{raiseNotImplementedError,"only partial hijack is supported."},RACK_HIJACK_IO=>nil)