I want to write a logging model and controller, to log everything that user does. I was thinking about creating a db table with from ip address, controller that user called, view that was displayed and params.inspect.
Is there a way to get to a variable which controller is currently being used? What is the best way to deploy this? Is out there a gem that do all this?
Thank you
If you set the log level in production to :debug then every request is logged with the information you need. Perhaps, it might be easier to write a parser for the debug production log.
If you prefer, you can also add a filter to your ApplicationController:
this might not be complete as you want the output to be more verbose, but this is the idea.