This commit is contained in:
jinql
2025-09-08 22:51:15 +08:00
parent f5f1c4e0b0
commit 24df67a6a2
7 changed files with 9 additions and 34 deletions

View File

@@ -80,7 +80,7 @@ class FileUtil:
if not FileUtil._validate_path(path):
return []
logger.info(f"开始遍历目录: {path}, 递归: {recursive}, 最小文件大小: {min_size}字节")
logger.debug(f"开始遍历目录: {path}, 递归: {recursive}, 最小文件大小: {min_size}字节")
result = []
if recursive:
@@ -97,7 +97,7 @@ class FileUtil:
continue
FileUtil._process_file(path, filename, min_size, include_size, result)
logger.info(f"目录遍历完成: {path}, 找到文件数: {len(result)}")
logger.debug(f"目录遍历完成: {path}, 找到文件数: {len(result)}")
return result
@staticmethod
@@ -124,7 +124,7 @@ class FileUtil:
if not FileUtil._validate_path(path):
return {}
logger.info(f"开始构建文件字典: {path}")
logger.debug(f"开始构建文件字典: {path}")
file_dict = {}
for root, _, files in os.walk(path):
@@ -148,7 +148,7 @@ class FileUtil:
if not recursive:
break
logger.info(f"文件字典构建完成: {path}, 文件数: {len(file_dict)}")
logger.debug(f"文件字典构建完成: {path}, 文件数: {len(file_dict)}")
return file_dict
@staticmethod

View File

@@ -6,7 +6,6 @@ import threading
from typing import Dict, Optional
# 配置日志
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)