Quick Rails Logging Tip

It's not difficult to alter how Rails logs requests. Just look at ActionController::Base#log_processing (see code here), and you can see that's it's basically just printing request.inspect. So if you override that method in your ApplicationController, you can change how requests are logged. This was important for me, because I'm using gsub to wipe credit card numbers from the log. Works like a charm!

Read this article
Written on Friday, September 14, 2007