c768faa5 by 冯轩

MOD:log

1 parent cb2f30f9
No preview for this file type
...@@ -1812,7 +1812,7 @@ class Command(BaseCommand, LoggerMixin): ...@@ -1812,7 +1812,7 @@ class Command(BaseCommand, LoggerMixin):
1812 json_data_1['text_list'] = text_list 1812 json_data_1['text_list'] = text_list
1813 1813
1814 start_time = time.time() 1814 start_time = time.time()
1815 self.online_log.info('{0} [ocr_1 api] [img={1}] [json_data_1={2}]'.format(self.log_base, img_path, json_data_1)) 1815 #self.online_log.info('{0} [ocr_1 api] [img={1}] [json_data_1={2}]'.format(self.log_base, img_path, json_data_1))
1816 ocr_1_response = requests.post(url, json=json_data_1) 1816 ocr_1_response = requests.post(url, json=json_data_1)
1817 if ocr_1_response.status_code != 200: 1817 if ocr_1_response.status_code != 200:
1818 raise OCR1Exception('ocr_1 status code: {0}'.format(ocr_1_response.status_code)) 1818 raise OCR1Exception('ocr_1 status code: {0}'.format(ocr_1_response.status_code))
...@@ -1823,7 +1823,7 @@ class Command(BaseCommand, LoggerMixin): ...@@ -1823,7 +1823,7 @@ class Command(BaseCommand, LoggerMixin):
1823 else: 1823 else:
1824 self.online_log.info('{0} [ocr_1 start] [img={1}] [url={2}]'.format(self.log_base, img_path, url)) 1824 self.online_log.info('{0} [ocr_1 start] [img={1}] [url={2}]'.format(self.log_base, img_path, url))
1825 ocr_1_res = ocr_1_response.json() 1825 ocr_1_res = ocr_1_response.json()
1826 self.online_log.info('{0} [ocr_1 api res] [img={1}] [ocr_1_res={2}]'.format(self.log_base, img_path, ocr_1_res)) 1826 #self.online_log.info('{0} [ocr_1 api res] [img={1}] [ocr_1_res={2}]'.format(self.log_base, img_path, ocr_1_res))
1827 end_time = time.time() 1827 end_time = time.time()
1828 speed_time = int(end_time - start_time) 1828 speed_time = int(end_time - start_time)
1829 self.online_log.info('{0} [ocr_1 success] [img={1}] [url={2}] [speed_time={3}]'.format( 1829 self.online_log.info('{0} [ocr_1 success] [img={1}] [url={2}] [speed_time={3}]'.format(
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!