diff --git a/python/rapidocr_onnxruntime/utils/logger.py b/python/rapidocr_onnxruntime/utils/logger.py index eb557ea83..3592817a4 100644 --- a/python/rapidocr_onnxruntime/utils/logger.py +++ b/python/rapidocr_onnxruntime/utils/logger.py @@ -5,7 +5,7 @@ from functools import lru_cache -@lru_cache +@lru_cache(maxsize=32) def get_logger(name: str): logger = logging.getLogger(name) logger.setLevel(logging.DEBUG) diff --git a/python/rapidocr_openvino/utils/logger.py b/python/rapidocr_openvino/utils/logger.py index ffd1cd04d..3592817a4 100644 --- a/python/rapidocr_openvino/utils/logger.py +++ b/python/rapidocr_openvino/utils/logger.py @@ -2,8 +2,10 @@ # @Author: SWHL # @Contact: liekkaskono@163.com import logging +from functools import lru_cache +@lru_cache(maxsize=32) def get_logger(name: str): logger = logging.getLogger(name) logger.setLevel(logging.DEBUG) diff --git a/python/rapidocr_paddle/utils/logger.py b/python/rapidocr_paddle/utils/logger.py index ffd1cd04d..3592817a4 100644 --- a/python/rapidocr_paddle/utils/logger.py +++ b/python/rapidocr_paddle/utils/logger.py @@ -2,8 +2,10 @@ # @Author: SWHL # @Contact: liekkaskono@163.com import logging +from functools import lru_cache +@lru_cache(maxsize=32) def get_logger(name: str): logger = logging.getLogger(name) logger.setLevel(logging.DEBUG)