Right now the loggers only have access to the request and response_body, but it would be nice to have access to the status code as well. For now, we're working around the problem by storing the intended status code in the request.env, but this is not ideal.
Not sure the best way to support this without breaking compatibility of the parameters call in
|
params.merge! logger.parameters(request, response_body) do |_, oldval, newval| |
. We could check if the signature accepts an optional 3rd argument?
Right now the loggers only have access to the
requestandresponse_body, but it would be nice to have access to the status code as well. For now, we're working around the problem by storing the intended status code in therequest.env, but this is not ideal.Not sure the best way to support this without breaking compatibility of the
parameterscall ingrape_logging/lib/grape_logging/middleware/request_logger.rb
Line 140 in fd8d2d4