instance method
log_error
Ruby on Rails 2.3.18
Since v2.2.3 Last seen in v2.3.18Available in: v2.2.3 v2.3.18
Signature
log_error(exception)
Overwrite to implement custom logging of errors. By default logs as fatal.
Parameters
-
exceptionreq
Source
# File actionpack/lib/action_controller/rescue.rb, line 79
def log_error(exception) #:doc:
ActiveSupport::Deprecation.silence do
if ActionView::TemplateError === exception
logger.fatal(exception.to_s)
else
logger.fatal(
"\n#{exception.class} (#{exception.message}):\n " +
clean_backtrace(exception).join("\n ") + "\n\n"
)
end
end
end
Defined in actionpack/lib/action_controller/rescue.rb line 79
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::Rescue