module ActionController::Live

def log_error(exception)

def log_error(exception)
  logger = ActionController::Base.logger
  return unless logger
  logger.fatal do
    message = +"\n#{exception.class} (#{exception.message}):\n"
    message << exception.annotated_source_code.to_s if exception.respond_to?(:annotated_source_code)
    message << "  " << exception.backtrace.join("\n  ")
    "#{message}\n\n"
  end
end