I was recently trying to silence webrick (the noisy bastard) to let me run it in a test suite. The bastard just wouldn't stay quiet, it kept saying stuff like:
[2010-06-22 15:29:11] INFO WEBrick::HTTPServer#start done. [2010-06-22 15:29:12] INFO WEBrick 1.3.1 [2010-06-22 15:29:12] INFO ruby 1.8.6 (2008-08-11) [x86_64-linux] [2010-06-22 15:29:12] INFO WEBrick::HTTPServer#start: pid=18324 port=4001
… like I care.
So it turns out that you can get WEBrick to STFU by creating it like this:
server = WEBrick::HTTPServer.new :AccessLog => , :Logger => WEBrick::Log::new("/dev/null", 7) #, :Port => @port and so on.
Why WEBrick needs so many options just to shut up I don't know.