This commit is contained in:
2025-01-15 18:06:16 +08:00
parent 57e5794f77
commit 6edb6c48e7
+1 -1
View File
@@ -13,7 +13,7 @@ def clean_log_files(directory):
# 清理超过7天的日志记录
if os.path.exists(log_file):
with open(log_file, 'r+') as f:
with open(log_file, 'r+', encoding='utf-8') as f:
lines = f.readlines()
f.seek(0)
for line in lines: