Take the 2-minute tour ×

Is there a way to change the log level for ActionController::RoutingError?
I'd like to change it from Error to Warning. Googled around and haven't found a solution...
I'd like just the routing errors to show up as warnings. but not change other logging behaviors.
One possible workaround (or part of that workaround) is described here http://stackoverflow.com/a/5386515/10272 but that's not exactly what I want. In this solution they just add a catch-all router for page-not-found errors and then deal with it in the catch-all-controller. But I'd like to be able to just change the log severity, if that's possible, it seems to better describe my intent...

share|improve this question

1 Answer 1

You could override the Simple Formatter so that you're logging the error as a warning.

However, I don't recommend taking this route as you end up logging a warning message for an action the application sees as an error/exception. The more elegant option would be to have a catch-all page as you described, with the controller catching the exception and logging the warning message.

share|improve this answer

Your Answer


