MOD:减少日志
Showing
1 changed file
with
2 additions
and
2 deletions
... | @@ -1814,7 +1814,7 @@ class Command(BaseCommand, LoggerMixin): | ... | @@ -1814,7 +1814,7 @@ class Command(BaseCommand, LoggerMixin): |
1814 | json_data_1['text_list'] = text_list | 1814 | json_data_1['text_list'] = text_list |
1815 | 1815 | ||
1816 | start_time = time.time() | 1816 | start_time = time.time() |
1817 | self.online_log.info('{0} [ocr_1 api] [img={1}] [json_data_1={2}]'.format(self.log_base, img_path, json_data_1)) | 1817 | # self.online_log.info('{0} [ocr_1 api] [img={1}] [json_data_1={2}]'.format(self.log_base, img_path, json_data_1)) |
1818 | ocr_1_response = requests.post(url, json=json_data_1) | 1818 | ocr_1_response = requests.post(url, json=json_data_1) |
1819 | if ocr_1_response.status_code != 200: | 1819 | if ocr_1_response.status_code != 200: |
1820 | raise OCR1Exception('ocr_1 status code: {0}'.format(ocr_1_response.status_code)) | 1820 | raise OCR1Exception('ocr_1 status code: {0}'.format(ocr_1_response.status_code)) |
... | @@ -1825,7 +1825,7 @@ class Command(BaseCommand, LoggerMixin): | ... | @@ -1825,7 +1825,7 @@ class Command(BaseCommand, LoggerMixin): |
1825 | else: | 1825 | else: |
1826 | self.online_log.info('{0} [ocr_1 start] [img={1}] [url={2}]'.format(self.log_base, img_path, url)) | 1826 | self.online_log.info('{0} [ocr_1 start] [img={1}] [url={2}]'.format(self.log_base, img_path, url)) |
1827 | ocr_1_res = ocr_1_response.json() | 1827 | ocr_1_res = ocr_1_response.json() |
1828 | self.online_log.info('{0} [ocr_1 api res] [img={1}] [ocr_1_res={2}]'.format(self.log_base, img_path, ocr_1_res)) | 1828 | # self.online_log.info('{0} [ocr_1 api res] [img={1}] [ocr_1_res={2}]'.format(self.log_base, img_path, ocr_1_res)) |
1829 | end_time = time.time() | 1829 | end_time = time.time() |
1830 | speed_time = int(end_time - start_time) | 1830 | speed_time = int(end_time - start_time) |
1831 | self.online_log.info('{0} [ocr_1 success] [img={1}] [url={2}] [speed_time={3}]'.format( | 1831 | self.online_log.info('{0} [ocr_1 success] [img={1}] [url={2}] [speed_time={3}]'.format( | ... | ... |
-
Please register or sign in to post a comment