When I run that with rackup
I get this on the output (after hitting the endpoint with curl localhost:9292
):
[2018-11-13 12:02:11] INFO WEBrick 1.3.1
[2018-11-13 12:02:11] INFO ruby 2.2.1 (2015-02-26) [x86_64-darwin14]
[2018-11-13 12:02:11] INFO WEBrick::HTTPServer#start: pid=15625 port=9292
Started GET "/" [http_request]
Completed 200 OK , 13 bytes, in 23.689ms [http_response]
::1 - - [13/Nov/2018:12:02:16 +0000] "GET / HTTP/1.1" 200 13 0.0276
From that I can see that the middleware is kicking in by decorating the request log output, but, it's the Common Log that gets sent to Timber.io (which, makes sense as I've told Sinatra to use the Rack::CommonLogger). However, how do I redirect the decorated logs correctly?
In the console on Timber.io I get:
Nov 13 12:02:16pm info "GET / HTTP/1.1" 200 13 0.0253
... which just seems to be the Common Log.