示例#1
0
文件: logger.py 项目: pganti/micheles
    def log_internal_error(self, error_summary, error_msg):
        """(error_summary: str, error_msg: str)

        error_summary is a single line summary of the internal error, suitable
        for an email subject.  error_msg is a multi-line plaintext message
        describing the error in detail.
        """
        self.log("exception caught")
        self.error_log.write(error_msg)
        if self.error_email:
            sendmail('Quixote Traceback (%s)' % error_summary,
                     error_msg, [self.error_email],
                     from_addr=(self.error_email, socket.gethostname()))
示例#2
0
    def log_internal_error(self, error_summary, error_msg):
        """(error_summary: str, error_msg: str)

        error_summary is a single line summary of the internal error, suitable
        for an email subject.  error_msg is a multi-line plaintext message
        describing the error in detail.
        """
        self.log("exception caught")
        self.error_log.write(error_msg)
        if self.error_email:
            sendmail('Quixote Traceback (%s)' % error_summary,
                     error_msg, [self.error_email],
                     from_addr=(self.error_email, socket.gethostname()))
示例#3
0
 def mail_error(self, msg, error_summary):
     """Send an email notifying someone of a traceback."""
     sendmail('Quixote Traceback (%s)' % error_summary,
              msg, [self.config.error_email],
              from_addr=(self.config.error_email, socket.gethostname()))
示例#4
0
 def mail_error(self, msg, error_summary):
     """Send an email notifying someone of a traceback."""
     sendmail('Quixote Traceback (%s)' % error_summary,
              msg, [self.config.error_email],
              from_addr=(self.config.error_email, socket.gethostname()))