优化错误日志及重试机制

This commit is contained in:
2024-07-23 09:27:59 +08:00
parent ee86bb4e74
commit bcd9f94daf
9 changed files with 64 additions and 52 deletions

View File

@@ -35,6 +35,7 @@ if __name__ == '__main__':
logging.info(f"{program_name}】开始运行")
photo_review.main()
except Exception as e:
logging.error(traceback.format_exc())
error_logger = logging.getLogger('error')
error_logger.error(traceback.format_exc())
if SEND_ERROR_EMAIL:
send_error_email(program_name, repr(e), traceback.format_exc())