roidrage / lograge

An attempt to tame Rails' default policy to log everything.
http://www.paperplanes.de/2012/3/14/on-notifications-logsubscribers-and-bringing-sanity-to-rails-logging.html
MIT License
3.47k stars 300 forks source link

Redirect in routes not handled by lograge #380

Open saurori opened 1 year ago

saurori commented 1 year ago

I noticed that calling redirect in routes causes log lines that are not handled by Lograge. For example:

Route:

get '/old-page', to: redirect('/new-page')

Log output:

Redirected to http://localhost:3000/new-page
Completed 301 Moved Permanently in 1ms

The README indicates redirect_to in controllers is hooked by lograge. Is it intentional that redirect in routes is not handled or is it possible for lograge to handle this?