From d0951ee27bf30974148978e55464579e7f136d6b Mon Sep 17 00:00:00 2001 From: Wang Baoling Date: Fri, 7 Jun 2024 13:48:56 +0800 Subject: [PATCH] fix: logger formater is not work (#1090) ### What problem does this PR solve? as title ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- api/utils/log_utils.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/utils/log_utils.py b/api/utils/log_utils.py index e74060d4b..e4e5a6a92 100644 --- a/api/utils/log_utils.py +++ b/api/utils/log_utils.py @@ -154,6 +154,11 @@ class LoggerFactory(object): delay=True) if level: handler.level = level + else: + handler.level = LoggerFactory.LEVEL + + formatter = logging.Formatter(LoggerFactory.LOG_FORMAT) + handler.setFormatter(formatter) return handler