예제 #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()))