From 943b8384ea7d209979175aca03b7e236158d5c6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=96=84=E7=9A=AE=E5=B0=8F=E7=AC=BC=E5=8C=85?= Date: Thu, 3 Sep 2020 20:26:13 +0800 Subject: [PATCH] delete concurrent_log_handler module --- packageship/packageship/libs/log/loghelper.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packageship/packageship/libs/log/loghelper.py b/packageship/packageship/libs/log/loghelper.py index fc53bb21..3b121223 100644 --- a/packageship/packageship/libs/log/loghelper.py +++ b/packageship/packageship/libs/log/loghelper.py @@ -5,7 +5,7 @@ Logging related import os import pathlib import logging -from concurrent_log_handler import ConcurrentRotatingFileHandler +from logging.handlers import RotatingFileHandler from packageship import system_config from packageship.libs.configutils.readconfig import ReadConfig @@ -44,7 +44,7 @@ def setup_log(config=None): except FileExistsError: pathlib.Path(path).touch() - file_log_handler = ConcurrentRotatingFileHandler( + file_log_handler = RotatingFileHandler( path, maxBytes=max_bytes, backupCount=backup_count) formatter = logging.Formatter( @@ -96,7 +96,7 @@ class Log(): self.max_bytes = 314572800 def __init_handler(self): - self.__file_handler = ConcurrentRotatingFileHandler( + self.__file_handler = RotatingFileHandler( self.__path, maxBytes=self.max_bytes, backupCount=self.backup_count, encoding="utf-8") def __set_handler(self): -- GitLab