torquebox/torquebox — pull request #110 by mifo (2012-11-17 20:33:47+00:00)
Title: Make Torquebox::Logger compatible with Rack::CommonLogger

This patch will allow Sinatra users to use Torquebox::Logger together with Rack::CommonLogger like:

# config.ru:
require './myapp'

use Rack:::CommonLogger, Torquebox::Logger.new

run MyApp

The Torquebox console will then output:

21:11:40,669 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "jsinatra-knob.yml"
21:11:44,802 INFO [jsinatra] (http-localhost.localdomain/127.0.0.1:8080-1) 127.0.0.1 - - [17/Nov/2012 21:11:44] "GET / " 200 12 0.5610
21:11:45,401 INFO [jsinatra] (http-localhost.localdomain/127.0.0.1:8080-1) 127.0.0.1 - - [17/Nov/2012 21:11:45] "GET / " 200 12 0.0070
21:11:46,062 INFO [jsinatra] (http-localhost.localdomain/127.0.0.1:8080-1) 127.0.0.1 - - [17/Nov/2012 21:11:46] "GET / " 200 12 0.0070