update traceback logging
This commit is contained in:
parent
bee14eb7e4
commit
32e33a41e1
@ -263,7 +263,7 @@ def process_sms(_rf_src, sms):
|
||||
except Exception as error_exception:
|
||||
logger.info('Failed to send email.')
|
||||
logger.info(error_exception)
|
||||
logger.info(traceback.print_tb(error_exception.__traceback__))
|
||||
logger.info(str(traceback.extract_tb(error_exception.__traceback__)))
|
||||
elif '@MH' in sms:
|
||||
grid_square = re.sub('@MH ', '', sms)
|
||||
if len(grid_square) < 6:
|
||||
@ -321,7 +321,7 @@ def process_sms(_rf_src, sms):
|
||||
except Exception as error_exception:
|
||||
logger.info('Exception. Not uploaded')
|
||||
logger.info(error_exception)
|
||||
logger.info(traceback.print_tb(error_exception.__traceback__))
|
||||
logger.info(str(traceback.extract_tb(error_exception.__traceback__)))
|
||||
packet_assembly = ''
|
||||
|
||||
|
||||
@ -344,7 +344,7 @@ def process_sms(_rf_src, sms):
|
||||
except Exception as error_exception:
|
||||
logger.info('Error uploading MSG packet.')
|
||||
logger.info(error_exception)
|
||||
logger.info(traceback.print_tb(error_exception.__traceback__))
|
||||
logger.info(str(traceback.extract_tb(error_exception.__traceback__)))
|
||||
try:
|
||||
if sms in cmd_list:
|
||||
logger.info('Executing command/script.')
|
||||
@ -353,7 +353,7 @@ def process_sms(_rf_src, sms):
|
||||
except Exception as error_exception:
|
||||
logger.info('Exception. Command possibly not in list, or other error.')
|
||||
logger.info(error_exception)
|
||||
logger.info(traceback.print_tb(error_exception.__traceback__))
|
||||
logger.info(str(traceback.extract_tb(error_exception.__traceback__)))
|
||||
packet_assembly = ''
|
||||
else:
|
||||
pass
|
||||
@ -1500,7 +1500,7 @@ class routerHBP(HBSYSTEM):
|
||||
except Exception as error_exception:
|
||||
logger.info('Error. Failed to send packet. Packet may be malformed.')
|
||||
logger.info(error_exception)
|
||||
logger.info(traceback.print_tb(error_exception.__traceback__))
|
||||
logger.info(str(traceback.extract_tb(error_exception.__traceback__)))
|
||||
udt_block = 1
|
||||
hdr_type = ''
|
||||
else:
|
||||
@ -1589,7 +1589,7 @@ class routerHBP(HBSYSTEM):
|
||||
logger.info('Error or user settings file not found, proceeding with default settings.')
|
||||
aprs_loc_packet = str(get_alias(int_id(_rf_src), subscriber_ids)) + '-' + str(user_ssid) + '>APHBL3,TCPIP*:/' + str(datetime.datetime.utcnow().strftime("%H%M%Sh")) + str(loc.lat[0:7]) + str(loc.lat_dir) + '/' + str(loc.lon[0:8]) + str(loc.lon_dir) + '[' + str(round(loc.true_course)).zfill(3) + '/' + str(round(loc.spd_over_grnd)).zfill(3) + '/' + aprs_comment + ' DMR ID: ' + str(int_id(_rf_src))
|
||||
logger.info(error_exception)
|
||||
logger.info(traceback.print_tb(error_exception.__traceback__))
|
||||
logger.info(str(traceback.extract_tb(error_exception.__traceback__)))
|
||||
try:
|
||||
# Try parse of APRS packet. If it fails, it will not upload to APRS-IS
|
||||
aprslib.parse(aprs_loc_packet)
|
||||
@ -1601,7 +1601,7 @@ class routerHBP(HBSYSTEM):
|
||||
except Exception as error_exception:
|
||||
logger.info('Failed to parse packet. Packet may be deformed. Not uploaded.')
|
||||
logger.info(error_exception)
|
||||
logger.info(traceback.print_tb(error_exception.__traceback__))
|
||||
logger.info(str(traceback.extract_tb(error_exception.__traceback__)))
|
||||
#final_packet = ''
|
||||
# Get callsign based on DMR ID
|
||||
# End APRS-IS upload
|
||||
|
14
gps_data.py
14
gps_data.py
@ -256,7 +256,7 @@ def process_sms(_rf_src, sms):
|
||||
except Exception as error_exception:
|
||||
logger.info('Failed to send email.')
|
||||
logger.info(error_exception)
|
||||
logger.info(traceback.print_tb(error_exception.__traceback__))
|
||||
logger.info(str(traceback.extract_tb(error_exception.__traceback__)))
|
||||
elif '@MH' in sms:
|
||||
grid_square = re.sub('@MH ', '', sms)
|
||||
if len(grid_square) < 6:
|
||||
@ -314,7 +314,7 @@ def process_sms(_rf_src, sms):
|
||||
except Exception as error_exception:
|
||||
logger.info('Exception. Not uploaded')
|
||||
logger.info(error_exception)
|
||||
logger.info(traceback.print_tb(error_exception.__traceback__))
|
||||
logger.info(str(traceback.extract_tb(error_exception.__traceback__)))
|
||||
packet_assembly = ''
|
||||
|
||||
|
||||
@ -337,7 +337,7 @@ def process_sms(_rf_src, sms):
|
||||
except Exception as error_exception:
|
||||
logger.info('Error uploading MSG packet.')
|
||||
logger.info(error_exception)
|
||||
logger.info(traceback.print_tb(error_exception.__traceback__))
|
||||
logger.info(str(traceback.extract_tb(error_exception.__traceback__)))
|
||||
try:
|
||||
if sms in cmd_list:
|
||||
logger.info('Executing command/script.')
|
||||
@ -347,7 +347,7 @@ def process_sms(_rf_src, sms):
|
||||
logger.info('Exception. Command possibly not in list, or other error.')
|
||||
packet_assembly = ''
|
||||
logger.info(error_exception)
|
||||
logger.info(traceback.print_tb(error_exception.__traceback__))
|
||||
logger.info(str(traceback.extract_tb(error_exception.__traceback__)))
|
||||
else:
|
||||
pass
|
||||
|
||||
@ -448,7 +448,7 @@ class DATA_SYSTEM(HBSYSTEM):
|
||||
except Exception as error_exception:
|
||||
logger.info('Error. Failed to send packet. Packet may be malformed.')
|
||||
logger.info(error_exception)
|
||||
logger.info(traceback.print_tb(error_exception.__traceback__))
|
||||
logger.info(str(traceback.extract_tb(error_exception.__traceback__)))
|
||||
udt_block = 1
|
||||
hdr_type = ''
|
||||
else:
|
||||
@ -537,7 +537,7 @@ class DATA_SYSTEM(HBSYSTEM):
|
||||
logger.info('Error or user settings file not found, proceeding with default settings.')
|
||||
aprs_loc_packet = str(get_alias(int_id(_rf_src), subscriber_ids)) + '-' + str(user_ssid) + '>APHBL3,TCPIP*:/' + str(datetime.datetime.utcnow().strftime("%H%M%Sh")) + str(loc.lat[0:7]) + str(loc.lat_dir) + '/' + str(loc.lon[0:8]) + str(loc.lon_dir) + '[' + str(round(loc.true_course)).zfill(3) + '/' + str(round(loc.spd_over_grnd)).zfill(3) + '/' + aprs_comment + ' DMR ID: ' + str(int_id(_rf_src))
|
||||
logger.info(error_exception)
|
||||
logger.info(traceback.print_tb(error_exception.__traceback__))
|
||||
logger.info(str(traceback.extract_tb(error_exception.__traceback__)))
|
||||
try:
|
||||
# Try parse of APRS packet. If it fails, it will not upload to APRS-IS
|
||||
aprslib.parse(aprs_loc_packet)
|
||||
@ -549,7 +549,7 @@ class DATA_SYSTEM(HBSYSTEM):
|
||||
except Exception as error_exception:
|
||||
logger.info('Failed to parse packet. Packet may be deformed. Not uploaded.')
|
||||
logger.info(error_exception)
|
||||
logger.info(traceback.print_tb(error_exception.__traceback__))
|
||||
logger.info(str(traceback.extract_tb(error_exception.__traceback__)))
|
||||
#final_packet = ''
|
||||
# Get callsign based on DMR ID
|
||||
# End APRS-IS upload
|
||||
|
Loading…
Reference in New Issue
Block a user