Friday, April 13, 2012

How To Disable Rack Logging in Sinatra

To completely & finally turn the annoying Rack logging off, simple 'set :logging, nil' doesn't help. Instead, insert this monkey patch at the beginning of your Sinatra application:

# Disable useless rack logger completely! Yay, yay!
module Rack
  class CommonLogger
    def call(env)
      # do nothing
      @app.call(env)
    end
  end
end

4 comments:

  1. Thanks man. This is the only way I could find that actually works.

    ReplyDelete
  2. HIO Firewood Log Racks from Bizarkdeal

    This is a great firewood cart. Will try to go over everything I can think of.

    Setup:
    The cart arrived in decent sized box, but required very little work to assemble. There were 7 big pieces and a few screws. There was a simple instruction manual, but you really didn't need it since it was so obvious how to put it together. Setup toko ~5 minutes for me, probably could have done in less, but I wanted to make sure it was perfect.

    Quality:
    The cart is made of pipes that are of really strong metal. The wheels were thick and filled with air, though you can add more if you need to(maybe after using it a while) The cart seemed like ti could easily hold a lot of weight, but I have no way to knowing the exact amount.

    Size:
    No complaints for me here. The size seemed perfect to hold a bunch of small logs are a few large ones. Obviously, length of the log could be a problem, but with this cart, you can definitely hold it as long as nothing gets in your way.

    Overall, very happy so far with the purchase. No real complaints so far after basic usage.

    ReplyDelete