Class: ActionDispatch::DebugExceptions

Inherits:
Object
  • Object
show all
Defined in:
lib/superlogger/action_dispatch_debug_exceptions.rb

Instance Method Summary collapse

Instance Method Details

#log_error(request, wrapper) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/superlogger/action_dispatch_debug_exceptions.rb', line 3

def log_error(request, wrapper)
  if wrapper.exception.is_a?  ActionController::RoutingError
    # Change routing errors to warn instead
    Superlogger::Logger.warn routing_error: request['PATH_INFO'].inspect
  else
    old_log_error request, wrapper
  end
end

#old_log_errorObject



2
# File 'lib/superlogger/action_dispatch_debug_exceptions.rb', line 2

alias_method :old_log_error, :log_error