For when you really, really don't want to log a request.
I'm using this logger to skip logging requests for CarrierWave-uploaded images in development. Loading database dumps from other environments means that the images simply aren't there in development. Rather than deal with an ActiveSupport::RoutingError
and a huge 20 line backtrace per missing image, I'm just suppressing all output using this logger and a catchall route that's only active in development.
Add lib/silenceable_logger.rb
to your Rails app, and adapt config/development.rb
and config/routes.rb
as needed.