0.0.4
This commit is contained in:
+1
-1
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user