I just upgraded an app from Ruby 2.3 / Rails 4.2 to Ruby 2.5.3 / Rails 5.2.2. The upgrade went smoothly but now when I test making calls in my development server, I notice that each page request generates two extra log lines in STDOUT (but not in my Rails log/development.log
) that I infer are coming from WEBrick, not Rails. I'd like to remove them. See below for example, the first line is the Rails request log (I want to keep that one) and the following two are ugly and redundant:
...
■ [GET /guiding_principles] params={} user=51 (Topher Hunt) status=200 duration=505.81ms
::1 - - [14/Jan/2019:21:22:45 CET] "GET /guiding_principles HTTP/1.1" 200 8840
http://localhost:3000/guiding_principles -> /guiding_principles
...
If you're starting a fresh WEBrick server, it looks like there's ways to configure or probably silence logging, see e.g. here and here. But I don't see a clear way (or any guidance on how) to do that in a Rails context.
How can I tell WEBrick not to log anything on each request?