add logs for contact not found error

This commit is contained in:
2022-03-24 10:26:44 +01:00
parent cd71577e71
commit d0d3d59f27
3 changed files with 8 additions and 2 deletions
+5 -1
View File
@@ -25,6 +25,7 @@ LOG_ERROR = "ERROR"
LOG_TYPE_INFO = "INFO"
LOG_APPOINTMENT_ERROR = "APPOINTMENT_ERROR"
LOG_APPOINTMENT_TIMEOUT = "TIMEOUT"
LOG_APPOINTMENT_CONTACT_NOT_FOUND = "CONTACT_NOT_FOUND"
LOG_APPOINTMENT_SUCCESS = "SUCCESS"
@@ -65,10 +66,13 @@ class LogSender:
msg = "phone:{}, sms:{}".format(phone, sms_text)
self.send_log(msg=msg, subject=LOG_SUBJECT_SMS, type=TYPE_SMS_RECEIVED)
def send_timeout_log(self,serial_modem: SerialModem):
def send_timeout_log(self, serial_modem: SerialModem):
msg = "phone:{}, ccid:{}".format(serial_modem.phone_number, serial_modem.ccid)
self.send_log(msg, type=LOG_APPOINTMENT_TIMEOUT)
def send_contact_not_found(self, msg: str):
self.send_log(msg, subject=SUBJECT_SIM_INFO, type=LOG_APPOINTMENT_CONTACT_NOT_FOUND)
if __name__ == '__main__':
init_logger()