Sinatra: three logs

大憨熊 提交于 2019-12-06 11:47:14

Rack is adding own logging as a middleware try to run

rackup -E none

This removes one log entry. The second one is sinatra native which you've already disable. And the third one is Rack::Lint logging if I remember correctly. General approach is to restructure your app like

app.rb

require 'sinatra/base'
class App < Sinatra::Base
  get '/' do
    "hello"
  end
end

config.ru

require 'myapp'
run MyApp 

Or you can run app outside rack

if __FILE__ == $0
  App.run!
end
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!