fix logger
Showing
1 changed file
with
3 additions
and
3 deletions
| ... | @@ -69,7 +69,7 @@ class Command(BaseCommand, LoggerMixin): | ... | @@ -69,7 +69,7 @@ class Command(BaseCommand, LoggerMixin): |
| 69 | if ocr_4_response.status_code != 200: | 69 | if ocr_4_response.status_code != 200: |
| 70 | raise OCR4Exception('ocr_4 status code: {0}'.format(ocr_4_response.status_code)) | 70 | raise OCR4Exception('ocr_4 status code: {0}'.format(ocr_4_response.status_code)) |
| 71 | except Exception as e: | 71 | except Exception as e: |
| 72 | self.cronjob_log.warn( | 72 | self.folder_log.warn( |
| 73 | '{0} [ocr_4 failed] [times={1}] [img_path={2}] [error={3}]'.format( | 73 | '{0} [ocr_4 failed] [times={1}] [img_path={2}] [error={3}]'.format( |
| 74 | self.log_base, times, img_path, traceback.format_exc())) | 74 | self.log_base, times, img_path, traceback.format_exc())) |
| 75 | else: | 75 | else: |
| ... | @@ -81,12 +81,12 @@ class Command(BaseCommand, LoggerMixin): | ... | @@ -81,12 +81,12 @@ class Command(BaseCommand, LoggerMixin): |
| 81 | card_type = ocr_4_res.get('result', {}).get( | 81 | card_type = ocr_4_res.get('result', {}).get( |
| 82 | 'idcard_distinguish_result', {}).get('result', -1) | 82 | 'idcard_distinguish_result', {}).get('result', -1) |
| 83 | 83 | ||
| 84 | self.cronjob_log.info( | 84 | self.folder_log.info( |
| 85 | '{0} [ocr_4 success] [img_path={1}] [speed_time={2}]'.format( | 85 | '{0} [ocr_4 success] [img_path={1}] [speed_time={2}]'.format( |
| 86 | self.log_base, img_path, speed_time)) | 86 | self.log_base, img_path, speed_time)) |
| 87 | break | 87 | break |
| 88 | else: | 88 | else: |
| 89 | self.cronjob_log.warn( | 89 | self.folder_log.warn( |
| 90 | '{0} [ocr_4 failed] [img_path={1}]'.format(self.log_base, img_path)) | 90 | '{0} [ocr_4 failed] [img_path={1}]'.format(self.log_base, img_path)) |
| 91 | 91 | ||
| 92 | id_card_dict[consts.IC_TURE_OR_FALSE] = consts.IC_RES_MAPPING.get(card_type) | 92 | id_card_dict[consts.IC_TURE_OR_FALSE] = consts.IC_RES_MAPPING.get(card_type) | ... | ... |
-
Please register or sign in to post a comment