OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/config/initializers/suppress_routing_error_logs.rb

16 lines
402 B

module NoRoutingErrorLogging
def log_error(env, wrapper)
super unless ignore_error?(env, wrapper)
end
def ignore_error?(env, wrapper)
!Rails.logger.debug? && routing_error?(env, wrapper)
end
def routing_error?(_env, wrapper)
wrapper.exception.is_a? ActionController::RoutingError
end
end
ActionDispatch::DebugExceptions.prepend NoRoutingErrorLogging if Rails.env.production?