Guest User

Untitled

a guest
Apr 24th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. Rack::Builder.new do
  2. use Rack::CommonLogger
  3. run SomeSinatraApp.new
  4. end
  5.  
  6.  
  7. ## is this the same as:
  8.  
  9. logger_app = Rack::CommonLogger.new(SomeSinatraApp.new,{})
  10.  
  11. # inside logger_app
  12.  
  13. def call(env)
  14. # whatever logger_app does
  15. sinatra_app_here.call(env)
  16. # maybe more stuff logger_app might do
  17. return [status,opt,body]
  18. end
Add Comment
Please, Sign In to add comment