合并35kg

This commit is contained in:
2025-09-30 14:44:12 +08:00
parent e764586cc7
commit bda47e10e9
15 changed files with 1173 additions and 17665 deletions

View File

@ -51,9 +51,18 @@ class Logger(QObject):
handler = TimedRotatingFileHandler(file_path, when='D', interval=1, backupCount=30,encoding='utf-8')
handler.suffix = "%Y-%m-%d"
formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s', datefmt='%Y-%m-%d %H:%M:%S')
formatter = logging.Formatter('%(asctime)s - %(levelname)s- %(message)s', datefmt='%Y-%m-%d %H:%M:%S')
handler.setFormatter(formatter)
self.logger_file_info.addHandler(handler)
# 添加错误专用日志文件
error_handler = TimedRotatingFileHandler(
file_path.replace('.log', '_error.log'),
when='D', interval=1, backupCount=30, encoding='utf-8')
error_handler.suffix = "%Y-%m-%d"
error_handler.setLevel(logging.ERROR) # 只处理错误级别
error_handler.setFormatter(formatter)
self.logger_file_info.addHandler(error_handler)
def _process_logs(self):
while True: