diff --git a/photo_mask.py b/photo_mask.py index a66e8b9..5e2715f 100644 --- a/photo_mask.py +++ b/photo_mask.py @@ -1,4 +1,4 @@ -import logging +import logging.config import math import os import tempfile @@ -13,6 +13,7 @@ from paddleocr import PaddleOCR from sqlalchemy import update from auto_email.error_email import send_an_error_email +from config.log import LOGGING_CONFIG from config.mysql import MysqlSession from config.photo_review import PHHD_BATCH_SIZE, SLEEP_MINUTES from config.ucloud import BUCKET @@ -261,6 +262,7 @@ def photo_mask(pk_phhd, content): if __name__ == '__main__': + logging.config.dictConfig(LOGGING_CONFIG) try: while 1: session = MysqlSession()