how do I filter RoutingErrors and their long stack trace out of my log? rails

Posted by codeman73 on Stack Overflow See other posts from Stack Overflow or by codeman73
Published on 2010-05-25T16:56:44Z Indexed on 2010/05/25 17:01 UTC
Read the original article Hit count: 232

Filed under:

I am seeing several strange requests like this, with urls like /sitemap/, /google_sitemap.xml.gz, /sitemap.xml.gz, /google_sitemap.xml, /cgi-bin/awstat/awstats.pl, etc. The default rails behavior dumps these long stack traces into my log, like the following:

ActionController::RoutingError (No route matches "/rails/info/properties" with {:method=>:get}):
/dh/passenger/lib/phusion_passenger/rack/request_handler.rb:92:in `process_request'
/dh/passenger/lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
/dh/passenger/lib/phusion_passenger/railz/application_spawner.rb:400:in `start_request_handler'
/dh/passenger/lib/phusion_passenger/railz/application_spawner.rb:351:in `handle_spawn_application'
/dh/passenger/lib/phusion_passenger/utils.rb:184:in `safe_fork'
etc.

Is there any way to stop these long stack traces? I wouldn't mind the first line, the ActionController::RoutingError with the message and the url, but I'd like to get rid of the long stack of passenger stuff.

© Stack Overflow or respective owner

Related posts about ruby-on-rails