Stop logging ActionController::RoutingError Rails 3.2 Stop logging ActionController::RoutingError Rails 3.2 ruby-on-rails ruby-on-rails

Stop logging ActionController::RoutingError Rails 3.2


The thing that logs/displays errors is the ActionDispatch::DebugExceptions middleware. You could just overwrite the log_error method, for example stick this in an initialiser:

class ActionDispatch::DebugExceptions  alias_method :old_log_error, :log_error  def log_error(env, wrapper)    if wrapper.exception.is_a?  ActionController::RoutingError      return    else      old_log_error env, wrapper    end  endend