This PR is related to issue #3 . It adds a request_id field to every log message, regardless if it's a simple webpacker message or a get request message. It does that using some middleware that saves the request_id from action_dispatch in the current thread and retrieving it in the formatter. Normally the request_id gets passed only to log messages that have request info, rather than all the log message, but that changes with the use of the middleware; now every message has it, so it makes it much easier to trace log messages related to a certain request. Also, locally tests pass, so this should be the case here too
This PR is related to issue #3 . It adds a
request_id
field to every log message, regardless if it's a simple webpacker message or a get request message. It does that using some middleware that saves therequest_id
fromaction_dispatch
in the current thread and retrieving it in the formatter. Normally therequest_id
gets passed only to log messages that have request info, rather than all the log message, but that changes with the use of the middleware; now every message has it, so it makes it much easier to trace log messages related to a certain request. Also, locally tests pass, so this should be the case here too