Redirect logger output for a specific controller in Rails 4
问题 I've built a solution based on the answer in my previous question Redirect logger output for a specific controller in Rails 3 for Rails 3. It works great however now I am trying to apply the same middleware based solution to a Rails 4 project but there are some differences keeping the same solution from working. The Rails 3 solution: module MyApp class LoggerMiddleware REPORTS_API_CONTROLLER_PATH = %r|\A/api/v.*/reports.*| REPORTS_API_CONTROLLER_LOGFILE = "reports_controller.log" def