def emit_exception(self, exc): self.log.exception(exc) return Event.save(self.crawler, self.stage, Event.LEVEL_ERROR, self.run_id, error=exc.__class__.__name__, message=str(exc))
def emit_exception(self, exc): self.log.exception(exc) return Event.save(self.crawler.name, self.operation_id, Event.LEVEL_ERROR, error_type=exc.__class__.__name__, error_message=unicode(exc), error_details=traceback.format_exc())
def emit_exception(self, exc): self.log.exception(exc) return Event.save(self.crawler.name, self.stage.name, Event.LEVEL_ERROR, self.run_id, error_type=exc.__class__.__name__, error_message=six.text_type(exc), error_details=traceback.format_exc())
def emit_warning(self, message, type=None, *args): if len(args): message = message % args self.log.warning(message) return Event.save(self.crawler, self.stage, Event.LEVEL_WARNING, self.run_id, error=type, message=message)
def emit_warning(self, message, type=None, details=None, *args): if len(args): message = message % args self.log.warning(message) return Event.save(self.crawler.name, self.operation_id, Event.LEVEL_WARNING, error_type=type, error_message=message, error_details=details)