title: How to silently start Sinatra + Thin?
body: <p>I have a Sinatra::Base webservice which I want to start from a command line Ruby program, so I have this:</p>
  
  <pre><code># command line program file
  require 'mymodule/server'
  
  puts "Running on 0.0.0.0:4567, debugging to STDOUT..."
  
  MyModule::Server.run! bind: '0.0.0.0', port: 4567, environment: :production
  </code></pre>
  
  <p>This works as expected but it throws out:</p>
  
  <pre><code>$ myscript
  Running on 0.0.0.0:4567, debugging to STDOUT...
  
  == Sinatra/1.3.1 has taken the stage on 4567 for production with backup from Thin
  &gt;&gt; Thin web server (v1.3.1 codename Triple Espresso)
  &gt;&gt; Maximum connections set to 1024
  &gt;&gt; Listening on 0.0.0.0:4567, CTRL+C to stop
  
  127.0.0.1 - - [23/Dec/2011 18:44:55] "POST /images HTTP/1.1" 200 360 0.0133
  ...
  </code></pre>
  
  <p>And I want it to be silent, and let me output what I want. For example, if I start it not daemonized I want to just see some message from the command line program and the log output, something like:</p>
  
  <pre><code>$ myscript
  Running on 0.0.0.0:4567, debugging to STDOUT...
  127.0.0.1 - - [23/Dec/2011 18:44:55] "POST /images HTTP/1.1" 200 360 0.0133
  ...
  </code></pre>
  
  <p>Also would like to silently shutdown it, hiding:</p>
  
  <pre><code>== Sinatra has ended his set (crowd applauds)
  </code></pre>
  
  <p>One last question, is this the best option to start a sinatra app with thin from inside an application code(ruby script in this case)?</p>